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


C# MockCSharpProject.SetProperty方法代码示例

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


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

示例1: NUnitConsole32BitUsedWhenTargetCpuIs32BitDotnet2

		public void NUnitConsole32BitUsedWhenTargetCpuIs32BitDotnet2()
		{
			MockCSharpProject project = new MockCSharpProject();
			project.ActiveConfiguration = "Debug";
			project.ActivePlatform = "AnyCPU";
			project.SetProperty("PlatformTarget", "x86");
			project.SetProperty("TargetFrameworkVersion", "v3.5");
			
			SelectedTests selectedTests = new SelectedTests(project);
			NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests);
			Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-dotnet2-x86.exe", app.FileName);
		}
开发者ID:rbrunhuber,项目名称:SharpDevelop,代码行数:12,代码来源:NUnitConsoleExeSelectedTestFixture.cs

示例2: NUnitConsole32BitUsedWhenTargetCpuIs32Bit

		public void NUnitConsole32BitUsedWhenTargetCpuIs32Bit()
		{
			MockCSharpProject project = new MockCSharpProject();
			project.ActiveConfiguration = "Debug";
			project.ActivePlatform = "AnyCPU";
			project.SetProperty("PlatformTarget", "x86");
			project.SetProperty("TargetFrameworkVersion", "v4.0");
			
			UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper();
			helper.Initialize(project, null);
			Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe", helper.UnitTestApplication);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:12,代码来源:NUnitConsoleExeSelectedTestFixture.cs

示例3: SetUp

		public void SetUp()
		{
			project = new MockCSharpProject();
			project.FileName = FileName.Create(@"C:\Projects\MyTests\MyTests.csproj");
			project.AssemblyName = "MyTests";
			project.OutputType = OutputType.Library;
			project.SetProperty("OutputPath", null);
			
			testProject = new NUnitTestProject(project);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:10,代码来源:NUnitConsoleCommandLineTests.cs


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