Package junit.framework

Examples of junit.framework.TestResult


        assertThat(exception.getMessage(), not(containsString("Appears to be stuck")));
    }

    @Test
    public void compatibility() {
        TestResult result = new TestResult();
        new JUnit4TestAdapter(InfiniteLoopTest.class).run(result);
        assertEquals(1, result.errorCount());
    }
View Full Code Here


        }
    }

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

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

    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());
    }
View Full Code Here

        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.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

    }

    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

    }

    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

    }

    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

                    public void write(int arg0) throws IOException {
                    }
                }
        ));
        try {
            TestResult result = junit.textui.TestRunner.run(new TestSuite());
            assertTrue(result.wasSuccessful());
        } finally {
            System.setOut(oldOut);
        }
    }
View Full Code Here

        };
        fTest = new DoubleTestCase(testCase);
    }

    public void testSuccessfulRun() {
        TestResult result = new TestResult();
        fTest.run(result);
        assertEquals(fTest.countTestCases(), result.runCount());
        assertEquals(0, result.errorCount());
        assertEquals(0, result.failureCount());
    }
View Full Code Here

TOP

Related Classes of junit.framework.TestResult

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.