本文整理汇总了C#中Runner.RunSimulations方法的典型用法代码示例。如果您正苦于以下问题:C# Runner.RunSimulations方法的具体用法?C# Runner.RunSimulations怎么用?C# Runner.RunSimulations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Runner
的用法示例。
在下文中一共展示了Runner.RunSimulations方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NotifiesListenersOfResults
public void NotifiesListenersOfResults()
{
var listener = context.CreateMock<SimulationResultListener>();
listener.Expects.AtLeastOne.Method(l => l.ReceiveSimulationResults(0,0)).WithAnyArguments();
var simulationParameterFactory = context.CreateInstance<SimulationParameterFactory>();
Runner runner = new Runner(simulationParameterFactory);
runner.RunSimulations(listener.MockObject, 0, false);
}
示例2: StartsTheCorrectNumberOfSimulations
public void StartsTheCorrectNumberOfSimulations()
{
var parameterFactory = context.CreateMock<SimulationParameterFactory>();
var simulationInstance = context.CreateInstance<SimulationInstance>();
parameterFactory.Expects.Exactly(5).Method(f => f.GenerateParameters(false)).WithAnyArguments().WillReturn(simulationInstance);
Runner runner = new Runner(parameterFactory.MockObject);
var listener = context.CreateInstance<SimulationResultListener>(MockStyle.Stub);
runner.RunSimulations(listener, 5, false);
}