Exemplo n.º 1
0
        public void testMethod()
        {
            // Arrange
            TestSuite suite = new TestSuite();

            // Act
            suite.Add(new DummyTestCase("dummyTestCase"));

            // Assert
            Assert.AreEqual(1, suite.Tests.Count);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            TestSuite suite = new TestSuite();
            suite.add(TestCase.CreateSuite(typeof(TimeTests)));

            TestResult result = new TestResult();
            suite.run(result);

            foreach (var failure in result.failures)
                Console.WriteLine(failure.message + ": " + failure.exception.Message);

            Console.WriteLine(result.summary());
            Console.ReadKey();
        }
Exemplo n.º 3
0
 public void testSuite()
 {
     TestSuite suite = new TestSuite();
     suite.Add(new WasRun("testMethod"));
     suite.Add(new WasRun("testBrokenMethod"));
     suite.Run(result);
     Assert.AreEqual("2 run, 1 failed", result.Summary());
 }