use of org.springframework.http.HttpHeaders in project spring-framework by spring-projects.
the class RequestMappingExceptionHandlingIntegrationTests method controllerThrowingException.
@Test
public void controllerThrowingException() throws Exception {
String expected = "Recovered from error: State";
assertEquals(expected, performGet("/thrown-exception", new HttpHeaders(), String.class).getBody());
}
use of org.springframework.http.HttpHeaders in project spring-framework by spring-projects.
the class RequestMappingExceptionHandlingIntegrationTests method controllerReturnsMonoError.
@Test
public void controllerReturnsMonoError() throws Exception {
String expected = "Recovered from error: Argument";
assertEquals(expected, performGet("/mono-error", new HttpHeaders(), String.class).getBody());
}
use of org.springframework.http.HttpHeaders in project spring-framework by spring-projects.
the class RequestMappingIntegrationTests method longStreamResult.
@Test
public void longStreamResult() throws Exception {
String[] expected = { "0", "1", "2", "3", "4" };
assertArrayEquals(expected, performGet("/long-stream-result", new HttpHeaders(), String[].class).getBody());
}
use of org.springframework.http.HttpHeaders in project spring-framework by spring-projects.
the class RequestMappingIntegrationTests method handleWithParam.
@Test
public void handleWithParam() throws Exception {
String expected = "Hello George!";
assertEquals(expected, performGet("/param?name=George", new HttpHeaders(), String.class).getBody());
}
use of org.springframework.http.HttpHeaders in project spring-framework by spring-projects.
the class RequestMappingMessageConversionIntegrationTests method byteBufferResponseBodyWithFlux.
@Test
public void byteBufferResponseBodyWithFlux() throws Exception {
String expected = "Hello!";
assertEquals(expected, performGet("/raw-response/flux", new HttpHeaders(), String.class).getBody());
}
Aggregations