티스토리 뷰

공부

[JUnit] MockServerRequest

승가비 2022. 7. 19. 22:07
728x90
val request = MockServerRequest.builder()
    .queryParam("a", a)
    .queryParam("b", b)
    .queryParam("c", c)
    .queryParam("d", d)
    .body(body)

https://stackoverflow.com/questions/63528788/why-doesnt-spring-webflux-mockserverrequest-allow-an-empty-body

 

Why doesn't Spring WebFlux MockServerRequest allow an empty body?

I'm writing some tests for a Spring WebFlux application and I'm trying to mock a scenario where a request doesn't have a body. I reached for the built-in MockServerRequest, figuring I'd use the bui...

stackoverflow.com

https://stackoverflow.com/questions/66956926/assert-webflux-serverresponse-using-mockserverrequest

 

Assert WebFlux ServerResponse using MockServerRequest

I want to separate router layer from handler layer, so I don't want to use WebTestClient as suggested in this question. I do not think throwing WebTestClient at the problem is the right solution. I...

stackoverflow.com

 

728x90
댓글