Search in sources :

Example 1 with RepeatedTest

use of junit.extensions.RepeatedTest in project junit4 by junit-team.

the class ActiveTestTest method testActiveRepeatedTest.

public void testActiveRepeatedTest() {
    Test test = new RepeatedTest(createActiveTestSuite(), 5);
    TestResult result = new TestResult();
    test.run(result);
    assertEquals(500, result.runCount());
    assertEquals(0, result.failureCount());
    assertEquals(0, result.errorCount());
}
Also used : Test(junit.framework.Test) RepeatedTest(junit.extensions.RepeatedTest) RepeatedTest(junit.extensions.RepeatedTest) TestResult(junit.framework.TestResult)

Example 2 with RepeatedTest

use of junit.extensions.RepeatedTest in project junit4 by junit-team.

the class ActiveTestTest method testActiveRepeatedTest1.

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());
}
Also used : Test(junit.framework.Test) RepeatedTest(junit.extensions.RepeatedTest) RepeatedTest(junit.extensions.RepeatedTest) TestResult(junit.framework.TestResult)

Example 3 with RepeatedTest

use of junit.extensions.RepeatedTest in project junit4 by junit-team.

the class RepeatedTestTest method testRepeatedZero.

public void testRepeatedZero() {
    Test test = new RepeatedTest(fSuite, 0);
    assertEquals(0, test.countTestCases());
    TestResult result = new TestResult();
    test.run(result);
    assertEquals(0, result.runCount());
}
Also used : Test(junit.framework.Test) RepeatedTest(junit.extensions.RepeatedTest) RepeatedTest(junit.extensions.RepeatedTest) TestResult(junit.framework.TestResult)

Example 4 with RepeatedTest

use of junit.extensions.RepeatedTest in project junit4 by junit-team.

the class RepeatedTestTest method testRepeatedMoreThanOnce.

public void testRepeatedMoreThanOnce() {
    Test test = new RepeatedTest(fSuite, 3);
    assertEquals(6, test.countTestCases());
    TestResult result = new TestResult();
    test.run(result);
    assertEquals(6, result.runCount());
}
Also used : Test(junit.framework.Test) RepeatedTest(junit.extensions.RepeatedTest) RepeatedTest(junit.extensions.RepeatedTest) TestResult(junit.framework.TestResult)

Example 5 with RepeatedTest

use of junit.extensions.RepeatedTest in project junit4 by junit-team.

the class ActiveTestTest method testActiveRepeatedTest0.

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());
}
Also used : Test(junit.framework.Test) RepeatedTest(junit.extensions.RepeatedTest) RepeatedTest(junit.extensions.RepeatedTest) TestResult(junit.framework.TestResult)

Aggregations

RepeatedTest (junit.extensions.RepeatedTest)6 Test (junit.framework.Test)6 TestResult (junit.framework.TestResult)6