当前位置: 首页>>代码示例>>C#>>正文


C# TestRunInfo.AddTestsToRun方法代码示例

本文整理汇总了C#中AutoTest.Core.Messaging.MessageConsumers.TestRunInfo.AddTestsToRun方法的典型用法代码示例。如果您正苦于以下问题:C# TestRunInfo.AddTestsToRun方法的具体用法?C# TestRunInfo.AddTestsToRun怎么用?C# TestRunInfo.AddTestsToRun使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AutoTest.Core.Messaging.MessageConsumers.TestRunInfo的用法示例。


在下文中一共展示了TestRunInfo.AddTestsToRun方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CloneToTestRunInfo

 public TestRunInfo CloneToTestRunInfo()
 {
     var runInfo = new TestRunInfo(Project, Assembly);
     runInfo.AddTestsToRun(GetTests());
     foreach (var runner in _onlyRunTestsFor)
         runInfo.ShouldOnlyRunSpcifiedTestsFor(runner);
     foreach (var runner in _rerunAllWhenFinishedFor)
         runInfo.ShouldRerunAllTestWhenFinishedFor(runner);
     return runInfo;
 }
开发者ID:zinark,项目名称:AutoTest.Net,代码行数:10,代码来源:RunInfo.cs

示例2: Should_create_a_filter_file_when_tests_to_run_are_specified

        public void Should_create_a_filter_file_when_tests_to_run_are_specified()
        {
            var document = new ProjectDocument(ProjectType.CSharp);
            document.SetFramework("framework 1");
            var info = new TestRunInfo(new Project("key 1", document), "assembly 1");
            info.AddTestsToRun(new[]
                               {
                                   new TestToRun(TestRunner.MSpec, "test 1"),
                                   new TestToRun(TestRunner.MSpec, "test 2")
                               });

            var infos = new[] { info };
            var run = new MSpecTestRunner.Run { RunInfos = infos };

            var args = _builder.Build(run);

            Assert.That(args, Is.StringContaining("--filter"));
            Assert.That(run.Cleanups.Count(), Is.EqualTo(2), "Should contain cleanup for XML report and filter");
        }
开发者ID:Vernathic,项目名称:ic-AutoTest.NET4CTDD,代码行数:19,代码来源:MSpecCommandLineBuilderTest.cs

示例3: Should_run_tests_for_each_framework_with_an_existing_runner

        public void Should_run_tests_for_each_framework_with_an_existing_runner()
        {
            _configuration
                .Stub(x => x.MSpecTestRunner("framework 1"))
                .Return("c:\\runner 1.exe");

            _configuration
                .Stub(x => x.MSpecTestRunner("framework 2"))
                .Return("c:\\runner 2.exe");

            _fileSystem
                .Stub(x => x.FileExists("c:\\runner 2.exe"))
                .Return(true);

            var document1 = new ProjectDocument(ProjectType.CSharp);
            document1.SetFramework("framework 1");
            var info1 = new TestRunInfo(new Project("key 1", document1), "assembly 1");

            var document2 = new ProjectDocument(ProjectType.CSharp);
            document2.SetFramework("framework 2");
            var info2 = new TestRunInfo(new Project("key 2", document2), "assembly 2");
            info2.AddTestsToRun(new[]
                                {
                                    new TestToRun(TestRunner.MSpec, "test 1"),
                                });

            var testRunInfos = new[] { info1, info2 };

            _runner.RunTests(testRunInfos, null);

            _externalProcess.AssertWasNotCalled(
                x => x.CreateAndWaitForExit(Arg<string>.Matches(y => y == "c:\\runner 1.exe"),
                                                   Arg<string>.Is.Anything));

            _externalProcess.AssertWasCalled(
                x => x.CreateAndWaitForExit(Arg<string>.Matches(y => y == "c:\\runner 2.exe"),
                                                   Arg<string>.Is.Anything));
        }
开发者ID:jeremywiebe,项目名称:AutoTest.Net,代码行数:38,代码来源:MSpecTestRunnerTest.cs


注:本文中的AutoTest.Core.Messaging.MessageConsumers.TestRunInfo.AddTestsToRun方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。