Пример #1
0
        public void InvalidLoggers_Handle_SetsLoggerListAsEmpty(string loggers)
        {
            var handler = new LoggersOptionHandler();
            var options = new DeploymentOptions {
                Loggers = loggers
            };

            handler.Handle(options);

            options.LoggerList.ShouldBeEmpty();
        }
Пример #2
0
        public void SingleLogger_Handle_SetsLoggerListWithOneEntry(string loggers)
        {
            var handler = new LoggersOptionHandler();
            var options = new DeploymentOptions {
                Loggers = loggers
            };

            handler.Handle(options);

            options.LoggerList.Length.ShouldBe(1);
            options.LoggerList.ShouldContain("Console");
        }
Пример #3
0
        public void MultipleLoggers_Handle_SetsLoggerListAsConsole(string loggers)
        {
            var handler = new LoggersOptionHandler();
            var options = new DeploymentOptions {
                Loggers = loggers
            };

            handler.Handle(options);

            options.LoggerList.Length.ShouldBe(2);
            options.LoggerList.ShouldContain("Console");
            options.LoggerList.ShouldContain("File");
        }