Пример #1
0
        public void StandardLoggerIsConsole()
        {
            ITask             task      = Substitute.For <ITask>();
            IArgumentProvider arguments = Substitute.For <IArgumentProvider>();

            using (ConsoleTaskInteraction interaction = (ConsoleTaskInteraction)ConsoleTaskInteraction.Create(task, arguments, null))
            {
                interaction.Loggers[LoggerType.Status].Should().BeSameAs(ConsoleLogger.Instance);
                interaction.Loggers[LoggerType.Result].Should().BeSameAs(ConsoleLogger.Instance);
            }
        }
Пример #2
0
        public void ClipTaskShouldHaveClipLoggers()
        {
            ITask task = Substitute.For <ITask>();

            task.GetOptionDefault <bool>(StandardOptions.Clipboard[0]).Returns(true);
            IArgumentProvider arguments = Substitute.For <IArgumentProvider>();

            using (ConsoleTaskInteraction interaction = (ConsoleTaskInteraction)ConsoleTaskInteraction.Create(task, arguments, null))
            {
                interaction.Loggers[LoggerType.Status].Should().BeSameAs(ConsoleLogger.Instance);
                interaction.Loggers[LoggerType.Result].Should().BeOfType <AggregatedLogger>();
            }
        }