예제 #1
0
        private TestResult CreateResults(string recipe)
        {
            TestResult result = new TestResult(new TestSuite("From Recipe"));

            foreach (char c in recipe)
            {
                TestResult r = new TestResult(new TestCase("test"));
                switch (c)
                {
                    case 'S':
                        r.Success();
                        break;
                    case 'F':
                        r.Failure("failed!");
                        break;
                    case 'E':
                        r.Error(new Exception("error!"));
                        break;
                    default:
                        break;
                }

                result.AddResult(r);
            }

            if (recipe.IndexOfAny(new char[] { 'E', 'F' }) >= 0)
                result.Failure("Errors");
            else
                result.Success();

            return result;
        }
예제 #2
0
 public void SummarizeSingleTestCase()
 {
     TestResult result = new TestResult(new TestCase( "TheTest", new DummyTestCase() ));
     result.Success();
     CreateSummaryAndVerify(result, 1, 0, 0, 0);
 }