public void GetStressTestResultTest() { StressTestCase target = new StressTestCase(); Assert.IsFalse(target.GetStressTestResult().HasValue); target.PerformStressTest(); Assert.IsTrue(target.GetStressTestResult().HasValue); }
public void PerformStressTestTest() { for (int i = 0; i < 30; i++) { StressTestCase target = new StressTestCase(); target.PerformStressTest(); TestCaseResult actual = target.GetStressTestResult(); if (actual.Result == TestResult.Fail) { Assert.IsTrue(actual.ReasonForFailure.Length > 0); } else { Assert.IsTrue(actual.ReasonForFailure == null); } } }