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


C# ProjectDocument.SetFramework方法代码示例

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


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

示例1: Should_get_product_version_spesific_build_executable

 public void Should_get_product_version_spesific_build_executable()
 {
     var document = new ProjectDocument(ProjectType.CSharp);
     document.SetFramework("v3.5");
     document.SetVSVersion("9.0.30729");
     _config.BuildExecutable(document).ShouldEqual(@"C:\ProductVersionFolder\MSBuild.exe");
 }
开发者ID:JamesTryand,项目名称:AutoTest.Net,代码行数:7,代码来源:ConfigTest.cs

示例2: Should_build_the_command_line_for_each_run

        public void Should_build_the_command_line_for_each_run()
        {
            _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(null))
                .IgnoreArguments()
                .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");

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

            _runner.RunTests(testRunInfos, null);

            _commandLineBuilder.AssertWasCalled(x => x.Build(null),
                                                o => o.IgnoreArguments().Repeat.Twice());
        }
开发者ID:jeremywiebe,项目名称:AutoTest.Net,代码行数:30,代码来源:MSpecTestRunnerTest.cs

示例3: Should_report_the_time_info

        public void Should_report_the_time_info()
        {
            var document = new ProjectDocument(ProjectType.CSharp);
            document.SetFramework("framework 1");
            var info = new TestRunInfo(new Project("key 1", document), "assembly 1");

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

            var args = _builder.Build(run);

            Assert.That(args, Is.StringContaining("--timeinfo"));
        }
开发者ID:Vernathic,项目名称:ic-AutoTest.NET4CTDD,代码行数:13,代码来源:MSpecCommandLineBuilderTest.cs

示例4: Should_create_the_assembly_list_from_distinct_assembly_names

        public void Should_create_the_assembly_list_from_distinct_assembly_names()
        {
            var document = new ProjectDocument(ProjectType.CSharp);
            document.SetFramework("framework 1");
            var info1 = new TestRunInfo(new Project("key 1", document), "assembly 1");
            var info2 = new TestRunInfo(new Project("key 2", document), "assembly 1");

            var infos = new[] { info1, info2 };
            var run = new MSpecTestRunner.Run { RunInfos = infos };

            var args = _builder.Build(run);

            var assembly1Count = new Regex("assembly 1").Matches(args).Count;
            Assert.That(assembly1Count, Is.EqualTo(1));
        }
开发者ID:Vernathic,项目名称:ic-AutoTest.NET4CTDD,代码行数:15,代码来源:MSpecCommandLineBuilderTest.cs

示例5: Should_create_the_assembly_list

        public void Should_create_the_assembly_list()
        {
            var document = new ProjectDocument(ProjectType.CSharp);
            document.SetFramework("framework 1");
            var info1 = new TestRunInfo(new Project("key 1", document), "assembly 1");
            var info2 = new TestRunInfo(new Project("key 2", document), "assembly 2");

            var infos = new[] { info1, info2 };
            var run = new MSpecTestRunner.Run { RunInfos = infos };

            var args = _builder.Build(run);

            Assert.That(args, Is.StringContaining(" \"assembly 1\""));
            Assert.That(args, Is.StringContaining(" \"assembly 2\""));
        }
开发者ID:Vernathic,项目名称:ic-AutoTest.NET4CTDD,代码行数:15,代码来源:MSpecCommandLineBuilderTest.cs

示例6: Should_create_an_xml_report

        public void Should_create_an_xml_report()
        {
            var document = new ProjectDocument(ProjectType.CSharp);
            document.SetFramework("framework 1");
            var info = new TestRunInfo(new Project("key 1", document), "assembly 1");

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

            var args = _builder.Build(run);

            Assert.That(args, Is.StringContaining("--xml"));
            Assert.That(run.Cleanups.Count(), Is.EqualTo(1));
            Assert.That(run.Harvesters.Count(), Is.EqualTo(1));
        } 
开发者ID:Vernathic,项目名称:ic-AutoTest.NET4CTDD,代码行数:15,代码来源:MSpecCommandLineBuilderTest.cs

示例7: 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

示例8: Should_not_create_a_filter_file_when_all_tests_are_run

        public void Should_not_create_a_filter_file_when_all_tests_are_run()
        {
            var document = new ProjectDocument(ProjectType.CSharp);
            document.SetFramework("framework 1");
            var info = new TestRunInfo(new Project("key 1", document), "assembly 1");

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

            var args = _builder.Build(run);

            Assert.That(args, Is.Not.StringContaining("--filter"));
        }
开发者ID:Vernathic,项目名称:ic-AutoTest.NET4CTDD,代码行数:13,代码来源:MSpecCommandLineBuilderTest.cs

示例9: Should_get_framework_spesific_build_executable

 public void Should_get_framework_spesific_build_executable()
 {
     var document = new ProjectDocument(ProjectType.CSharp);
     document.SetFramework("v3.5");
     _config.BuildExecutable(document).ShouldEqual(@"C:\SomefolderOther\MSBuild.exe");
 }
开发者ID:JamesTryand,项目名称:AutoTest.Net,代码行数:6,代码来源:ConfigTest.cs

示例10: Should_merge_two_config_files

		public void Should_merge_two_config_files()
		{
			createMergeFile();
			var document = new ProjectDocument(ProjectType.CSharp);
			var document35 = new ProjectDocument(ProjectType.CSharp);
			document35.SetFramework("v3.5");
			_config.Merge(_overridConfig);
				
            _config.BuildExecutable(document).ShouldEqual("");
			_config.NunitTestRunner(document.Framework).ShouldEqual(@"C:\Somefolder\NUnit\nunit-console.exe");
			_config.NunitTestRunner(document35.Framework).ShouldEqual("NewTestRunner");
			_config.GrowlNotify.ShouldEqual("another_growl_notifier");
			_config.TestAssembliesToIgnore[2].ShouldEqual("MergedRule.dll");
			_config.FileChangeBatchDelay.ShouldEqual(800);
		}
开发者ID:JamesTryand,项目名称:AutoTest.Net,代码行数:15,代码来源:ConfigTest.cs

示例11: setFrameworkVersion

 private void setFrameworkVersion(ProjectDocument newDocument)
 {
     newDocument.SetFramework(getNode(FRAMEWORK_NODE));
 }
开发者ID:tonyx,项目名称:AutoTest.Net,代码行数:4,代码来源:ProjectParser.cs

示例12: Should_check_the_runner_exe_for_each_framework

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

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

            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");

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

            _runner.RunTests(testRunInfos, null);

            _fileSystem.AssertWasCalled(x => x.FileExists("c:\\runner 1.exe"));
            _fileSystem.AssertWasCalled(x => x.FileExists("c:\\runner 2.exe"));
        }
开发者ID:jeremywiebe,项目名称:AutoTest.Net,代码行数:25,代码来源:MSpecTestRunnerTest.cs

示例13: 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

示例14: setFrameworkVersion

 private void setFrameworkVersion(ProjectDocument newDocument)
 {
     newDocument.SetFramework(getNode("b:Project/b:PropertyGroup/b:TargetFrameworkVersion"));
 }
开发者ID:noamkfir,项目名称:AutoTest.Net,代码行数:4,代码来源:ProjectParser.cs


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