Пример #1
0
 public void AddDuplicateTestCase2()
 {
     TestSuite suite = new TestSuite("Suite");
     TestCase tc = new TestCase("Test", new TestDelegate(this.Test));
     suite.Add(tc);
     suite.Add(tc);
 }
Пример #2
0
 public TestSuite Suite()
 {
     TestSuite suite = new TestSuite("SimpleSuite");
     suite.Add( "Test1", new TestDelegate( this.Test ), "hello" );
     suite.Add( "Test2", new TestDelegate( this.AnotherTest), "another test" );
     return suite;
 }
 public TestSuite GetSuite()
 {
     TestSuite suite = new TestSuite("Suite1");
     suite.Add( "Setup 1, Teardown 0", new TestDelegate( this.Test ), 1, 0 );
     suite.Add( "Setup 2, Teardown 1", new TestDelegate( this.Test ), 2, 1 );
     suite.Add( "Setup 3, Teardown 2", new TestDelegate( this.Test ), 3, 2 );
     return suite;
 }
Пример #4
0
 public void AddTestCase()
 {
     TestSuite suite = new TestSuite("Suite");
     TestCase tc = suite.Add("Test", new TestDelegate(this.Test));
     Assert.IsNotNull(tc);
     Assert.AreEqual(1, suite.TestCases.Count);
 }
Пример #5
0
 public TestSuite VerifiedSuite()
 {
     TestSuite suite = new TestSuite("VerifiedSuite");
     TestCase tc = TestCases.Case("Verify that tests returns hello world", new TestDelegate(this.TestReturnHelloWorld),"hello");
     VerifiedTestCase vtc = TestCases.Verified(tc,this.helloWorld);
     suite.Add(vtc);
     return suite;
 }
Пример #6
0
        public TestSuite ExpectedExceptionSuite()
        {
            TestSuite suite = new TestSuite("ExpectedExceptionSuite");

            ITestCase tc = TestCases.Case("Verfiy that tests throw", new TestDelegate(this.ThrowMe));
            ITestCase etc = TestCases.ExpectedException(tc, typeof(Exception));
            suite.Add(etc);
            return suite;
        }
 public ITestSuite Decorate(ITestSuite suite)
 {
     TestSuite checkedSuite = new TestSuite(suite.Name);
     foreach (ITestCase testCase in suite.TestCases)
     {
         PerformanceCounterCheckerTestCase checkedTestCase = new PerformanceCounterCheckerTestCase(this,testCase);
         checkedSuite.Add(checkedTestCase);
     }
     return checkedSuite;
 }
 public TestSuite GetSuite()
 {
     TestSuite suite = new TestSuite("SeparateClass");
     suite.Add( "TestClassA", new VoidTestDelegate(classA.SomeMethodA ) );
     return suite;
 }
 public TestSuite GetSuite()
 {
     TestSuite suite = new TestSuite("Suite1");
     suite.Add( "SomeSuiteDefinedTest", new TestDelegate( this.SomeSuiteDefinedTest ) );
     return suite;
 }
 public TestSuite GetSuite()
 {
     TestSuite suite = new TestSuite("Suite1");
     suite.Add( "TestExpectedException", new TestDelegate(this.TestThrowsException ) );
     return suite;
 }
Пример #11
0
 public void AddNullTestCase()
 {
     TestSuite suite = new TestSuite("Suite");
     suite.Add(null);
 }
Пример #12
0
 public void AddNullName()
 {
     TestSuite suite = new TestSuite("Suite");
     suite.Add(null, new TestDelegate(this.Test));
 }
Пример #13
0
 public void AddEmptyName()
 {
     TestSuite suite = new TestSuite("Suite");
     suite.Add("", new TestDelegate(this.Test));
 }