コード例 #1
0
        public void ExecutorExecuteShouldReturnSuccessWithoutExecutionInDesignMode()
        {
            CommandLineOptions.Instance.Reset();
            CommandLineOptions.Instance.IsDesignMode = true;
            var testRequestManager = new TestRequestManager(CommandLineOptions.Instance, new TestPlatform(), TestLoggerManager.Instance, TestRunResultAggregator.Instance, this.mockTestPlatformEventSource.Object);
            var executor           = new RunTestsArgumentExecutor(CommandLineOptions.Instance, null, testRequestManager);

            Assert.AreEqual(ArgumentProcessorResult.Success, executor.Execute());
        }
コード例 #2
0
        private static RunTestsArgumentExecutor GetExecutor(ITestRequestManager testRequestManager)
        {
            var runSettingsProvider = new TestableRunSettingsProvider();

            runSettingsProvider.AddDefaultRunSettings();
            var executor = new RunTestsArgumentExecutor(
                CommandLineOptions.Instance,
                runSettingsProvider,
                testRequestManager);

            return(executor);
        }
コード例 #3
0
        public void ExecutorExecuteShouldReturnSuccessWithoutExecutionInDesignMode()
        {
            var runSettingsProvider = new TestableRunSettingsProvider();

            runSettingsProvider.UpdateRunSettings("<RunSettings/>");

            CommandLineOptions.Instance.Reset();
            CommandLineOptions.Instance.IsDesignMode = true;
            var testRequestManager = new TestRequestManager(CommandLineOptions.Instance, TestPlatformFactory.GetTestPlatform(), TestRunResultAggregator.Instance, this.mockTestPlatformEventSource.Object, this.inferHelper, this.mockMetricsPublisherTask);
            var executor           = new RunTestsArgumentExecutor(CommandLineOptions.Instance, runSettingsProvider, testRequestManager, this.mockOutput.Object);

            Assert.AreEqual(ArgumentProcessorResult.Success, executor.Execute());
        }