本文整理汇总了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);
}
示例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);
}
示例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);
}