use of com.github.mjeanroy.junit.servers.utils.builders.NingHttpResponseBuilder in project junit-servers by mjeanroy.
the class NingAsyncHttpResponseFactoryTest method it_should_create_http_response.
@Test
void it_should_create_http_response() {
final Response delegate = new NingHttpResponseBuilder().build();
final long duration = 1000L;
final HttpResponse response = NingAsyncHttpResponseFactory.of(delegate, duration);
assertThat(response).isNotNull().isExactlyInstanceOf(NingAsyncHttpResponse.class);
assertThat(response.getRequestDuration()).isEqualTo(duration);
}
use of com.github.mjeanroy.junit.servers.utils.builders.NingHttpResponseBuilder in project junit-servers by mjeanroy.
the class NingAsyncHttpResponseTest method it_should_implement_to_string.
@Test
void it_should_implement_to_string() {
final Response delegate = new NingHttpResponseBuilder().build();
final long duration = 1000L;
final NingAsyncHttpResponse response = new NingAsyncHttpResponse(delegate, duration);
assertThat(response.toString()).isEqualTo("NingAsyncHttpResponse{" + "duration: 1000, " + "response: " + delegate.toString() + "}");
}
Aggregations