コード例 #1
0
        public void Test_LoggingEnabled_DebugMode_DebugLevel_SettingsTrue_ReturnsTrue()
        {
            LogSupervisor supervisor = new LogSupervisor();
            supervisor.ModeDetector = new MockModeDetector(true);
            supervisor.SettingsManager = MockLogSettingsManager.NewSpecified(true);

            bool isEnabled = supervisor.LoggingEnabled(LogLevel.Debug);

            Assert.IsTrue(isEnabled, "Should have been true.");
        }
コード例 #2
0
        public void Test_LoggingEnabled_ReleaseMode_InfoLevel_ReturnsTrue()
        {
            LogSupervisor supervisor = new LogSupervisor();
            supervisor.ModeDetector = new MockModeDetector(false);

            bool isEnabled = supervisor.LoggingEnabled(LogLevel.Info);

            Assert.IsTrue(isEnabled, "Should have been true.");
        }