Пример #1
0
 public InstrumentCommand(IServiceProvider serviceProvider,
                          VerbosityOption verbosityOption,
                          WorkingDirectoryOption workingDirectoryOption,
                          ParentDirectoryOption parentDirOption,
                          IncludeAssembliesPatternOption includeAssembliesOption,
                          ExcludeAssembliesPatternOption excludeAssembliesOption,
                          IncludeSourcesPatternOption includeSourceOption,
                          ExcludeSourcesPatternOption excludeSourceOption,
                          IncludeTestsPatternOption includeTestsOption,
                          ExcludeTestsPatternOption excludeTestsOption,
                          HitsDirectoryOption hitsDirectoryOption,
                          CoverageFileOption coverageFileOption)
 {
     _serviceProvider         = serviceProvider;
     _verbosityOption         = verbosityOption;
     _workingDirectoryOption  = workingDirectoryOption;
     _parentDirOption         = parentDirOption;
     _includeAssembliesOption = includeAssembliesOption;
     _excludeAssembliesOption = excludeAssembliesOption;
     _includeSourceOption     = includeSourceOption;
     _excludeSourceOption     = excludeSourceOption;
     _includeTestsOption      = includeTestsOption;
     _excludeTestsOption      = excludeTestsOption;
     _hitsDirectoryOption     = hitsDirectoryOption;
     _coverageFileOption      = coverageFileOption;
 }
        public void ShouldHaveProperties()
        {
            var outputMock = new Mock <IOutput>();
            var sut        = new VerbosityOption(outputMock.Object);

            sut.Template.Should().NotBeEmpty();
            sut.Description.Should().NotBeEmpty();
        }
        public void Value_ShouldSetOutputVerbose(string input)
        {
            var outputMock = new Mock <IOutput>();

            outputMock.SetupProperty(o => o.MinimumLevel, LogLevel.Information);

            var sut = new VerbosityOption(outputMock.Object);

            sut.ReceiveValue(input);
            outputMock.Object.MinimumLevel.Should().Be(LogLevel.Debug);
        }
        public void NoValue_ShouldNotCHangeOutput()
        {
            var outputMock = new Mock <IOutput>();

            outputMock.SetupProperty(o => o.MinimumLevel, LogLevel.Information);

            var sut = new VerbosityOption(outputMock.Object);

            sut.ReceiveValue(null);
            outputMock.Object.MinimumLevel.Should().Be(LogLevel.Information);
        }
Пример #5
0
 public ResetCommand(
     IHitsResetter hitResetService,
     VerbosityOption verbosityOption,
     WorkingDirectoryOption workingDirectoryOption,
     HitsDirectoryOption hitsDirectoryOption)
 {
     _hitResetService        = hitResetService;
     _verbosityOption        = verbosityOption;
     _workingDirectoryOption = workingDirectoryOption;
     _hitsDirectoryOption    = hitsDirectoryOption;
 }
Пример #6
0
 public ResetCommand(
     IOutput console,
     VerbosityOption verbosityOption,
     WorkingDirectoryOption workingDirectoryOption,
     HitsDirectoryOption hitsDirectoryOption)
 {
     _console                = console;
     _verbosityOption        = verbosityOption;
     _workingDirectoryOption = workingDirectoryOption;
     _hitsDirectoryOption    = hitsDirectoryOption;
 }
        public void InvalidValue_ShouldThrow()
        {
            var outputMock = new Mock <IOutput>();

            outputMock.SetupProperty(o => o.MinimumLevel, LogLevel.Information);

            var sut = new VerbosityOption(outputMock.Object);

            Action act = () => sut.ReceiveValue("InvalidLevel");

            act.Should().Throw <ValidationException>();
        }
Пример #8
0
        public UninstrumentCommand(
            VerbosityOption verbosityOption,
            WorkingDirectoryOption workingDirectoryOption,
            CoverageLoadedFileOption coverageLoadedFileOption)
            : base(_name, _description)
        {
            _coverageLoadedFileOption = coverageLoadedFileOption;

            Options = new IOption[]
            {
                verbosityOption,
                workingDirectoryOption,
                coverageLoadedFileOption
            };
        }
Пример #9
0
        public ResetCommand(
            IOutput console,
            VerbosityOption verbosityOption,
            WorkingDirectoryOption workingDirectoryOption,
            HitsDirectoryOption hitsDirectoryOption)
            : base(_name, _description)
        {
            _console             = console;
            _hitsDirectoryOption = hitsDirectoryOption;

            Options = new IOption[]
            {
                verbosityOption,
                workingDirectoryOption,
                hitsDirectoryOption
            };
        }
Пример #10
0
        public InstrumentCommand(IServiceProvider serviceProvider,
                                 VerbosityOption verbosityOption,
                                 WorkingDirectoryOption workingDirectoryOption,
                                 ParentDirectoryOption parentDirOption,
                                 IncludeAssembliesPatternOption includeAssembliesOption,
                                 ExcludeAssembliesPatternOption excludeAssembliesOption,
                                 IncludeSourcesPatternOption includeSourceOption,
                                 ExcludeSourcesPatternOption excludeSourceOption,
                                 IncludeTestsPatternOption includeTestsOption,
                                 ExcludeTestsPatternOption excludeTestsOption,
                                 HitsDirectoryOption hitsDirectoryOption,
                                 CoverageFileOption coverageFileOption)
            : base(_name, _description)
        {
            _serviceProvider         = serviceProvider;
            _workingDirectoryOption  = workingDirectoryOption;
            _parentDirOption         = parentDirOption;
            _includeAssembliesOption = includeAssembliesOption;
            _excludeAssembliesOption = excludeAssembliesOption;
            _includeSourceOption     = includeSourceOption;
            _excludeSourceOption     = excludeSourceOption;
            _includeTestsOption      = includeTestsOption;
            _excludeTestsOption      = excludeTestsOption;
            _hitsDirectoryOption     = hitsDirectoryOption;
            _coverageFileOption      = coverageFileOption;

            Options = new IOption[]
            {
                verbosityOption,
                workingDirectoryOption,
                parentDirOption,
                includeAssembliesOption,
                excludeAssembliesOption,
                includeSourceOption,
                excludeSourceOption,
                includeTestsOption,
                excludeTestsOption,
                hitsDirectoryOption,
                coverageFileOption
            };
        }