Package junit.framework

Examples of junit.framework.TestCase.run()


        int                   count;

        result = new TestResult();
        test   = new TestLikePredicateOptimizations("test");

        test.run(result);

        count = result.failureCount();

        System.out.println("TestLikePredicateOptimizations failure count: "
                           + count);
View Full Code Here


        int                   count;

        result = new TestResult();
        test   = new TestBug785429("test");

        test.run(result);

        count = result.failureCount();

        System.out.println("TestBug785429 failure count: " + count);
View Full Code Here

        int                   count;

        result = new TestResult();
        test   = new TestDatabaseMetaData("test");

        test.run(result);

        count = result.failureCount();

        System.out.println("TestDatabaseMetaData failure count: " + count);
View Full Code Here

    public static void main(String[] argv) {

        TestResult result = new TestResult();
        TestCase   testA  = new TestMultiInsert("testMultiInsert");

        testA.run(result);
        System.out.println("TestMultiInsert error count: " + result.failureCount());
        Enumeration e = result.failures();
        while(e.hasMoreElements()) System.out.println(e.nextElement());
    }
}
View Full Code Here

    }

    public void testNamelessTestCase() {
        TestCase t = new TestCase() {
        };
        TestResult result = t.run();
        assertEquals(1, result.failureCount());
    }

    void verifyError(TestCase test) {
        TestResult result = test.run();
View Full Code Here

            @Override
            public void runTest() {
                throw new Error();
            }
        };
        test.run(fResult);
        assertEquals(1, fErrorCount);
        assertEquals(1, fEndCount);
    }

    public void testFailure() {
View Full Code Here

            @Override
            public void runTest() {
                fail();
            }
        };
        test.run(fResult);
        assertEquals(1, fFailureCount);
        assertEquals(1, fEndCount);
    }

    public void testStartStop() {
View Full Code Here

        TestCase test = new TestCase("noop") {
            @Override
            public void runTest() {
            }
        };
        test.run(fResult);
        assertEquals(1, fStartCount);
        assertEquals(1, fEndCount);
    }
}
View Full Code Here

      @Override
      public void runTest() {
        throw new Error();
      }
    };
    test.run(fResult);
    assertEquals(1, fErrorCount);
    assertEquals(1, fEndCount);
  }
  public void testFailure() {
    TestCase test= new TestCase("noop") {
View Full Code Here

      @Override
      public void runTest() {
        fail();
      }
    };
    test.run(fResult);
    assertEquals(1, fFailureCount);
    assertEquals(1, fEndCount);
  }
  public void testStartStop() {
    TestCase test= new TestCase("noop") {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.