use of brave.jaxrs2.TracingClientFilter.ClientRequestContextWrapper in project brave by openzipkin.
the class ClientRequestContextWrapperTest method url.
@Test
public void url() {
when(request.getUri()).thenReturn(URI.create("http://localhost/api"));
assertThat(new ClientRequestContextWrapper(request).url()).isEqualTo("http://localhost/api");
}
use of brave.jaxrs2.TracingClientFilter.ClientRequestContextWrapper in project brave by openzipkin.
the class ClientRequestContextWrapperTest method path_emptyToSlash.
// NOTE: While technically possible, it is not easy to make URI.getPath() return null!
@Test
public void path_emptyToSlash() {
when(request.getUri()).thenReturn(URI.create("http://localhost"));
assertThat(new ClientRequestContextWrapper(request).path()).isEqualTo("/");
}
use of brave.jaxrs2.TracingClientFilter.ClientRequestContextWrapper in project brave by openzipkin.
the class ClientRequestContextWrapperTest method path.
@Test
public void path() {
when(request.getUri()).thenReturn(URI.create("http://localhost/api"));
assertThat(new ClientRequestContextWrapper(request).path()).isEqualTo("/api");
}
use of brave.jaxrs2.TracingClientFilter.ClientRequestContextWrapper in project brave by openzipkin.
the class ClientRequestContextWrapperTest method method.
@Test
public void method() {
when(request.getMethod()).thenReturn("GET");
assertThat(new ClientRequestContextWrapper(request).method()).isEqualTo("GET");
}
use of brave.jaxrs2.TracingClientFilter.ClientRequestContextWrapper in project brave by openzipkin.
the class ClientRequestContextWrapperTest method header.
@Test
public void header() {
when(request.getHeaderString("name")).thenReturn("value");
assertThat(new ClientRequestContextWrapper(request).header("name")).isEqualTo("value");
}
Aggregations