Skip to content

Expose org.springframework.test.web.servlet.assertj.DefaultMvcTestResult or provide factory method to create org.springframework.test.web.servlet.assertj.MvcTestResult #36341

@zeldigas

Description

@zeldigas

MockMvcTester is really great, but it is currently implemented in pretty self-contained way - you must use it for all stages - from making request to doing responses.

I have a scenario where i want to start directly with fluent assertions (request phase is done in internal project specific code that eventually can return ResultAction/MvcResult). Unfortunatelly all constructors are package local so there is no good way (instead of hacky-style creating class in spring's package) to do the part that is currently done inside org.springframework.test.web.servlet.assertj.MockMvcTester#perform:

//the part that I'd like to do
new DefaultMvcTestResult(mvcResult, null, this.converterDelegate);

Can you consider exposign it or suggesting what can be the option without changing existing Spring codebase?

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: testIssues in the test modulestatus: feedback-reminderWe've sent a reminder that we need additional information before we can continuestatus: waiting-for-feedbackWe need additional information before we can continuestatus: waiting-for-triageAn issue we've not yet triaged or decided on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions