Exemple #1
0
        public void GetStressTestResultTest()
        {
            StressTestCase target = new StressTestCase();

            Assert.IsFalse(target.GetStressTestResult().HasValue);
            target.PerformStressTest();
            Assert.IsTrue(target.GetStressTestResult().HasValue);
        }
Exemple #2
0
        public void GetStressTestResultTest()
        {
            StressTestCase target = new StressTestCase();
            TestCaseResult actual = target.GetStressTestResult();

            Assert.IsTrue(actual.Result == TestResult.Pass);
            Assert.IsTrue(actual.ReasonForFailure == null);
        }
Exemple #3
0
 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);
         }
     }
 }