public void ResumeFatigueTest(FatigueTest fatigueTest) { _currentTest = fatigueTest; _currentTest.Start(); OnTestStarted(_currentTest); // this starts the test running Singleton.TurnOn(); }
public void BeginCurrentTest() { if (_currentTest == null) { throw new Exception("No test has been defined. Must create a test first."); } if (!_currentTest.InProcess) { _currentTest.StartDate = DateTime.Now; TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time"); DateTimeOffset offsetCentralTime = TimeZoneInfo.ConvertTime(new DateTimeOffset( DateTime.UtcNow, new TimeSpan(0, 0, 0)), timeZoneInfo); _currentTest.StartTime = offsetCentralTime.TimeOfDay; _currentTest.Start(); OnTestStarted(_currentTest); // this starts the test running Singleton.TurnOn(); } }