Is there a way to use AssertJ assertions with Spring MVC Test?

后端 未结 3 1577
情话喂你
情话喂你 2021-02-07 04:07

I have been using AssertJ for some time in my projects. Recently I started using Spring MVC Test for testing Spring MVC controllers.

But I am not getting how to use Ass

3条回答
  •  北荒
    北荒 (楼主)
    2021-02-07 05:02

    I've put together a library that offers AssertJ assertions for MockMvc but also for ResponseEntity (returned by TestRestTemplate): https://github.com/ngeor/yak4j-spring-test-utils

提交回复
热议问题