Example #1
0
        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));
        }
Example #2
0
        public void GivenActivate_WhenProcessIsNull_ThenThrows_Test()
        {
            var result = new SimulationRunner <SimulationEnvironment>(new SimulationEnvironment());

            Assert.Throws <ArgumentNullException>(() => result.Activate(TimeSpan.Zero, null));
        }