Testing a custom RepositoryRestController that uses a PersistentEntityResourceAssembler

后端 未结 2 1671
深忆病人
深忆病人 2021-01-14 11:36

I have a RepositoryRestController that exposes resources for some persistent entities.

I have a method on my controller that takes a PersistentEnt

2条回答
  •  [愿得一人]
    2021-01-14 12:13

    I ended up for now with:

    @RunWith(SpringRunner.class)
    @SpringBootTest
    @AutoConfigureMockMvc
    

    The downsite of it is that the test would start the full Spring application context (but without the server).

提交回复
热议问题