Hi guys! I'm currently working on a REST applicati...
# test
Hi guys! I'm currently working on a REST application and try to do that with spring boot, webflux and the functional way with kotlin. With Annotations one could write unit tests by mocking the repository and call the methods of the controller. As the controller returns a Mono of the desired object, it was easily compared and asserted. In the functional way, my handler returns a Mono<ServerResponse>. When I debug it, the desired object is in that ServerResponse, but how to I get it's body? The interface doesn't offer a method for that?! I'm already using the WebTestClient for integration tests, but would now like to write some unit tests for the handler, just like I did for the controller earlier. Any help is appreciated! 🙂
seems more like a spring question, maybe ask on gitter? also I suspect maybe you’re using the wrong interface
I’d have to look at the spring docs though to find the right one