public void GivenRun_WhenUntilIsNegative_ThenThrows_Test() { var result = new SimulationRunner <SimulationEnvironment>(new SimulationEnvironment()); var until = TimeSpan.FromSeconds(-1); Assert.Throws <ArgumentOutOfRangeException>(() => result.Run(until)); }
public void GivenCtor_WhenSimulationEnvironment_Then() { var expected = new SimulationEnvironment(); var result = new SimulationRunner <SimulationEnvironment>(expected); Assert.Equal(expected, result.Environment); }
public void GivenActivate_WhenAtIsNegative_ThenThrows_Test() { var result = new SimulationRunner <SimulationEnvironment>(new SimulationEnvironment()); var at = TimeSpan.FromSeconds(-1); var process = new Mock <Process>().Object; Assert.Throws <ArgumentOutOfRangeException>(() => result.Activate(at, process)); }
public void GivenActivate_WhenProcessIsNull_ThenThrows_Test() { var result = new SimulationRunner <SimulationEnvironment>(new SimulationEnvironment()); Assert.Throws <ArgumentNullException>(() => result.Activate(TimeSpan.Zero, null)); }
public EventVisitor(SimulationRunner <TSimulationEnvironment> runner) { _runner = runner; }