本文整理汇总了C#中Suite.Run方法的典型用法代码示例。如果您正苦于以下问题:C# Suite.Run方法的具体用法?C# Suite.Run怎么用?C# Suite.Run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Suite
的用法示例。
在下文中一共展示了Suite.Run方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ZeroTestsWhatEverTransitions
public void ZeroTestsWhatEverTransitions()
{
var suite =
new Suite(0)
.Do<SomeFixtureToRun>()
.Do<SomeOtherFixtureToRun>()
.Do(new[] {1, 100}.FromRange(), opt => opt.Register<YetAnotherFixtureToRun>());
suite.Run();
Assert.Equal(0, fixturesExecuted.Count);
}
示例2: OneTestZeroTransitions
public void OneTestZeroTransitions()
{
var suite =
new Suite(1)
.Do<SomeFixtureToRun>()
.Do<SomeOtherFixtureToRun>()
.Do(0, opt => opt.Register<YetAnotherFixtureToRun>());
suite.Run();
Assert.Equal(2, fixturesExecuted.Count);
Assert.Equal(1, fixturesExecuted[0]);
Assert.Equal(2, fixturesExecuted[1]);
}
示例3: OneTestWhateverTransitions
public void OneTestWhateverTransitions()
{
var numberOfTransitions = new[] {1, 100}.FromRange();
var suite =
new Suite(1)
.Do<SomeFixtureToRun>()
.Do<SomeOtherFixtureToRun>()
.Do(numberOfTransitions, opt => opt.Register<YetAnotherFixtureToRun>());
suite.Run();
Assert.Equal(numberOfTransitions + 2, fixturesExecuted.Count);
Assert.Equal(1, fixturesExecuted[0]);
Assert.Equal(2, fixturesExecuted[1]);
for (int i = 2; i < numberOfTransitions + 2; i++)
{
Assert.Equal(3, fixturesExecuted[i]);
}
}
示例4: TestRunAllTests
public void TestRunAllTests()
{
Suite suite = new Suite(typeof(WasRunObj));
suite.Run(m_result);
Assert.Equal("2 run, 1 failed", m_result.Summary);
}
示例5: TestSuiteOperation
public void TestSuiteOperation()
{
Suite suite = new Suite();
suite.Add(new WasRunObj("TestMethod"));
suite.Add(new WasRunObj("TestBrokenMethod"));
suite.Run(m_result);
Assert.Equal("2 run, 1 failed", m_result.Summary);
}