Questions tagged [webtestclient]

36 questions
0
votes
0 answers

400 Bad Request Error in the Unit Test with Multipart File and WebTestClient Object

I am trying to create a unit test with webTestClient POST for my controller. In the API, I have a multipartfile and two String parameter. However, I couldn't catch the request in the API although I have tried a lot of thing. Where am I wrong? My API…
0
votes
0 answers

Junit5 using WebTestClient failing for Spring Function

I have written a Spring Function and I am able to run junit to validate function. Howerver, if I am try to run junit to test same function as Http endpoint, below error is thrown. java.lang.AssertionError: Status expected:<200 OK> but was:<404…
0
votes
0 answers

SOAP request fails when using oracle Web Services Test Client

I have a web services developed on Jdeveloper. When i test it using postman it works fine. But when i open oracle web services test client and try the following error:
user666
  • 1,750
  • 3
  • 18
  • 34
0
votes
1 answer

Assertion error for testing Junit with reactive WebTestClient Status Expected :201 Actual :404

@ExtendWith(SpringExtension.class) @WebFluxTest(controllers = EventsControllerTest.class) class EventsControllerTest { @MockBean UserRepo repo; @Autowired private WebTestClient webClient; @Test void testAssignUserRoles() { …
Sankar
  • 131
  • 1
  • 2
  • 11
-1
votes
1 answer

Null Pointer Exception Mockito Argument(s) are different (WebTestClient Put bodyValue)

@Test void checkPutProfileNotFound() { ProfileDto profileDto = new ProfileDto("abcd@gmail.com", "abcd", null, null); when(profileService.putProfile(profileDto)).thenReturn(Mono.error(new NotFoundException())); …
-2
votes
1 answer

Spring boot - WebFlux - WebTestClient - convert response to responseEntity

I have a Reactive controller which returns: @ResponseBody @GetMapping("/data") public Mono> getData() { //service call which returns Mono dataMono Mono> responseEntityMono = dataMono …
1 2
3