Package junit.framework

Examples of junit.framework.Test


        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }

    public void testActiveRepeatedTest0() {
        Test test = new RepeatedTest(createActiveTestSuite(), 0);
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(0, result.runCount());
        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }
View Full Code Here


        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }

    public void testActiveRepeatedTest1() {
        Test test = new RepeatedTest(createActiveTestSuite(), 1);
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(100, result.runCount());
        assertEquals(0, result.failureCount());
        assertEquals(0, result.errorCount());
    }
View Full Code Here

        fSuite.addTest(new SuccessTest());
        fSuite.addTest(new SuccessTest());
    }

    public void testRepeatedOnce() {
        Test test = new RepeatedTest(fSuite, 1);
        assertEquals(2, test.countTestCases());
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(2, result.runCount());
    }
View Full Code Here

        test.run(result);
        assertEquals(2, result.runCount());
    }

    public void testRepeatedMoreThanOnce() {
        Test test = new RepeatedTest(fSuite, 3);
        assertEquals(6, test.countTestCases());
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(6, result.runCount());
    }
View Full Code Here

        test.run(result);
        assertEquals(6, result.runCount());
    }

    public void testRepeatedZero() {
        Test test = new RepeatedTest(fSuite, 0);
        assertEquals(0, test.countTestCases());
        TestResult result = new TestResult();
        test.run(result);
        assertEquals(0, result.runCount());
    }
View Full Code Here

        assertTrue(fResult.wasSuccessful());
        assertEquals(2, fResult.runCount());
    }

    public void testNoTestCaseClass() {
        Test t = new TestSuite(NoTestCaseClass.class);
        t.run(fResult);
        assertEquals(1, fResult.runCount())// warning test
        assertTrue(!fResult.wasSuccessful());
    }
View Full Code Here

        assertEquals(1, fResult.runCount())// warning test
        assertTrue(!fResult.wasSuccessful());
    }

    public void testNoTestCases() {
        Test t = new TestSuite(NoTestCases.class);
        t.run(fResult);
        assertTrue(fResult.runCount() == 1)// warning test
        assertTrue(fResult.failureCount() == 1);
        assertTrue(!fResult.wasSuccessful());
    }
View Full Code Here

        assertTrue(fResult.failureCount() == 1);
        assertTrue(!fResult.wasSuccessful());
    }

    public void testNotExistingTestCase() {
        Test t = new SuiteTest("notExistingMethod");
        t.run(fResult);
        assertTrue(fResult.runCount() == 1);
        assertTrue(fResult.failureCount() == 1);
        assertTrue(fResult.errorCount() == 0);
    }
View Full Code Here

//    t.run(fResult);
//    assertEquals(1, fResult.runCount());  // warning test
//    assertTrue(! fResult.wasSuccessful());
//  }
  public void testNoTestCases() {
    Test t= new TestSuite(NoTestCases.class);
    t.run(fResult);
    assertTrue(fResult.runCount() == 1)// warning test
    assertTrue(fResult.failureCount() == 1);
    assertTrue(! fResult.wasSuccessful());
  }
View Full Code Here

    assertTrue(fResult.runCount() == 1)// warning test
    assertTrue(fResult.failureCount() == 1);
    assertTrue(! fResult.wasSuccessful());
  }
  public void testNotExistingTestCase() {
    Test t= new SuiteTest("notExistingMethod");
    t.run(fResult);
    assertTrue(fResult.runCount() == 1)
    assertTrue(fResult.failureCount() == 1);
    assertTrue(fResult.errorCount() == 0);
  }
View Full Code Here

TOP

Related Classes of junit.framework.Test

Copyright © 2018 www.massapicom. 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.