Пример #1
0
        public void Test_Telemetry_IsEnabled()
        {
            // Arrange
            var logger = new AppInsightsLogger("test", LogLevel.Trace);

            logger.BeginScope("test");
            logger.Flush();

            // Act/Assert
            Assert.True(logger.IsEnabled(LogLevel.Information));
        }
Пример #2
0
        public void BeginScopeIsNotImplemented()
        {
            var logger = new AppInsightsLogger(LogLevel.Information, _connString, _stubTelemetryChannel);

            Assert.Throws <NotImplementedException>(() => logger.BeginScope("tester"));
        }