コード例 #1
0
        public void GetStressTestResultTest()
        {
            StressTestCase target = new StressTestCase();

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

            Assert.IsTrue(actual.Result == TestResult.Pass);
            Assert.IsTrue(actual.ReasonForFailure == null);
        }
コード例 #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);
         }
     }
 }