private Telemetry sendAIEventAndGetOutputTelemetry(boolean isExceptionEvent) { this.telemetryClientProxy.sendEvent(createApplicationInsightEvent(isExceptionEvent)); return this.telemetriesSent.get(0); }
@Test public void testTelemetryClientProxyInitializedCorrectlyWhenNullInstrumentationKeyProvided() { initializeTelemetryClientProxyWithInstrumentationKeyAndVerifyInitialization(null); }
@Before public void before() { this.telemetryClientMock = Mockito.mock(TelemetryClient.class); this.telemetriesSent = new LinkedList<Telemetry>(); setupTelemetryClientMock(this.telemetriesSent); this.telemetryClientProxy = new LogTelemetryClientProxy(telemetryClientMock, INSTRUMENTATION_KEY); }
@Test public void testTraceIsClassifiedAndSentCorrectly() { Telemetry telemetry = sendAIEventAndGetOutputTelemetry(false); Assert.assertTrue("Exactly one Trace telemetry should be sent.", telemetry instanceof TraceTelemetry); }
@Test public void testExceptionIsClassifiedAndSentCorrectly() { Telemetry telemetry = sendAIEventAndGetOutputTelemetry(true); Assert.assertTrue("Exception telemetry should be sent.", telemetry instanceof ExceptionTelemetry); }
@Test public void testTraceIsClassifiedAndSentCorrectlyWithLogLevel() { Telemetry telemetry = sendAIEventAndGetOutputTelemetry(false); Assert.assertTrue("Exactly one Trace telemetry should be sent.", telemetry instanceof TraceTelemetry); }
@Test public void testTelemetryClientProxyInitializedCorrectlyWhenEmptyInstrumentationKeyProvided() { initializeTelemetryClientProxyWithInstrumentationKeyAndVerifyInitialization(""); }
@Before public void before() { this.telemetryClientMock = Mockito.mock(TelemetryClient.class); this.telemetriesSent = new LinkedList<Telemetry>(); setupTelemetryClientMock(this.telemetriesSent); this.telemetryClientProxy = new LogTelemetryClientProxy(telemetryClientMock, INSTRUMENTATION_KEY); }
private Telemetry sendAIEventAndGetOutputTelemetry(boolean isExceptionEvent) { this.telemetryClientProxy.sendEvent(createApplicationInsightEvent(isExceptionEvent)); return this.telemetriesSent.get(0); }
@Test public void testTraceIsClassifiedAndSentCorrectlyWithLogLevel() { Telemetry telemetry = sendAIEventAndGetOutputTelemetry(false); Assert.assertTrue("Exactly one Trace telemetry should be sent.", telemetry instanceof TraceTelemetry); }
@Test public void testTelemetryClientProxyInitializedCorrectlyWhenEmptyInstrumentationKeyProvided() { initializeTelemetryClientProxyWithInstrumentationKeyAndVerifyInitialization(""); }
@Before public void before() { this.telemetryClientMock = Mockito.mock(TelemetryClient.class); this.telemetriesSent = new LinkedList<Telemetry>(); setupTelemetryClientMock(this.telemetriesSent); this.telemetryClientProxy = new LogTelemetryClientProxy(telemetryClientMock, INSTRUMENTATION_KEY); }
private Telemetry sendAIEventAndGetOutputTelemetry(boolean isExceptionEvent) { this.telemetryClientProxy.sendEvent(createApplicationInsightEvent(isExceptionEvent)); return this.telemetriesSent.get(0); }
@Test public void testTraceIsClassifiedAndSentCorrectly() { Telemetry telemetry = sendAIEventAndGetOutputTelemetry(false); Assert.assertTrue("Exactly one Trace telemetry should be sent.", telemetry instanceof TraceTelemetry); }
@Test public void testTelemetryClientProxyInitializedCorrectlyWhenNullInstrumentationKeyProvided() { initializeTelemetryClientProxyWithInstrumentationKeyAndVerifyInitialization(null); }
@Test public void testTraceIsClassifiedAndSentCorrectly() { Telemetry telemetry = sendAIEventAndGetOutputTelemetry(false); Assert.assertTrue("Exactly one Trace telemetry should be sent.", telemetry instanceof TraceTelemetry); }
@Test public void testTelemetryClientProxyInitializedCorrectlyWhenNullInstrumentationKeyProvided() { initializeTelemetryClientProxyWithInstrumentationKeyAndVerifyInitialization(null); }
@Test public void testTraceIsClassifiedAndSentCorrectlyWithLogLevel() { Telemetry telemetry = sendAIEventAndGetOutputTelemetry(false); Assert.assertTrue("Exactly one Trace telemetry should be sent.", telemetry instanceof TraceTelemetry); }
@Test public void testTelemetryClientProxyInitializedCorrectlyWhenEmptyInstrumentationKeyProvided() { initializeTelemetryClientProxyWithInstrumentationKeyAndVerifyInitialization(""); }
@Test public void testExceptionIsClassifiedAndSentCorrectly() { Telemetry telemetry = sendAIEventAndGetOutputTelemetry(true); Assert.assertTrue("Exception telemetry should be sent.", telemetry instanceof ExceptionTelemetry); }