use of com.auth0.net.Telemetry in project auth0-java-mvc-common by auth0.
the class AuthenticationControllerTest method shouldSetupClientWithTelemetry.
@Test
public void shouldSetupClientWithTelemetry() {
AuthenticationController controller = builderSpy.build();
ArgumentCaptor<Telemetry> telemetryCaptor = ArgumentCaptor.forClass(Telemetry.class);
assertThat(controller, is(notNullValue()));
RequestProcessor requestProcessor = controller.getRequestProcessor();
assertThat(requestProcessor.getClient(), is(client));
verify(client).setTelemetry(telemetryCaptor.capture());
Telemetry capturedTelemetry = telemetryCaptor.getValue();
assertThat(capturedTelemetry, is(notNullValue()));
assertThat(capturedTelemetry.getName(), is("auth0-java-mvc-common"));
assertThat(capturedTelemetry.getVersion(), is("1.2.3"));
}
Aggregations