Skip to content

Integrate Traverson to MockMvc tests #733

Open
@pmihalcin

Description

@pmihalcin

I typically write tests with MockMvc where you can set up expectations using very nice DSL.
Test is annotated with

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK)
@AutoConfigureMockMvc

Then I can autowire

@Autowired
MockMvc mvc

Then I can do mvc.perform(get("URI where I want to go"))
.andExpect(status().isOk()) and other expectations

"URI where I want to go" is concatenated list of resources and I thought I could start using Traverson to do navigation for me.

I thought I would be able to use it, but as of now I need fully-blown server.
Could you please extend Traverson to allow using it in MockMvc tests?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions