public void TestIsException() { // no task Assert.IsFalse(runtime.IsException()); // has task runtime.taskList.Add(new Task()); Assert.IsTrue(runtime.IsException()); // standard time is low ResetRuntime(); runtime.taskList.Add(new Task()); runtime.stdTime = 0.01; Assert.IsTrue(runtime.IsException()); // standard time is normal ResetRuntime(); runtime.taskList.Add(new Task()); runtime.stdTime = 0.1; Assert.IsFalse(runtime.IsException()); // actual time is low ResetRuntime(); runtime.taskList.Add(new Task()); runtime.actualTime = 0.01; Assert.IsFalse(runtime.IsException()); // actual time is normal ResetRuntime(); runtime.taskList.Add(new Task()); runtime.actualTime = 0.9; Assert.IsTrue(runtime.IsException()); // sls time is low ResetRuntime(); runtime.taskList.Add(new Task()); runtime.slsTime = 0.01; Assert.IsFalse(runtime.IsException()); // sls time is normal ResetRuntime(); runtime.taskList.Add(new Task()); runtime.slsTime = 0.9; Assert.IsTrue(runtime.IsException()); }