コード例 #1
0
        public void Enable_Disable_ShouldStartAndStopTracing()
        {
            var traceOutput = new StringBuilder();

            InternalLogger.Enable(msg => traceOutput.AppendLine(msg));

            NotifyAsync();

            Assert.True(traceOutput.Length > 0, traceOutput.ToString());

            InternalLogger.Disable();
            traceOutput.Clear();

            NotifyAsync();

            Assert.True(traceOutput.Length == 0, traceOutput.ToString());
        }