本文整理汇总了C#中Runner.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Runner.Add方法的具体用法?C# Runner.Add怎么用?C# Runner.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Runner
的用法示例。
在下文中一共展示了Runner.Add方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Method_Scenario_Result
public void Method_Scenario_Result()
{
var runner = new Runner();
runner.Add("Simon");
runner.Add("Bary");
runner.Add("John");
runner.Add("Scot");
}
示例2: TestRunnerSetupAndRunSucceeds
public void TestRunnerSetupAndRunSucceeds()
{
Runner runner = new Runner();
runner.Add(new TestAgentFactory());
runner.Add(new TestAgent("FunctionalTest3", 4));
runner.Add(new TestAgent("FunctionalTest4", 5));
runner.SetupAndRunWithLimit(1);
Assert.AreEqual(4, runner.Agents.Count);
}
示例3: TestRunnerSetupFailsWithNullAgent
public void TestRunnerSetupFailsWithNullAgent()
{
try
{
Runner runner = new Runner();
Agent agent = null;
runner.Add(agent);
Assert.Fail("Runner should raise exception when null agent is passed");
}
catch (ArgumentNullException)
{
// Expected
}
}
示例4: TestRunnerReportContinuesWithNegativeValue
public void TestRunnerReportContinuesWithNegativeValue()
{
Runner runner = new Runner();
runner.Add(new TestAgent("FunctionalTest", -10));
runner.SetupAndRunWithLimit(1); // Should not raise an exception
}
示例5: TestRunnerReportContinuesWithNullAgentName
public void TestRunnerReportContinuesWithNullAgentName()
{
Runner runner = new Runner();
runner.Add(new TestAgent("", 4));
runner.SetupAndRunWithLimit(1); // Should not raise an exception
}