Examples of wasSuccessful()


Examples of org.junit.runner.Result.wasSuccessful()

    }

    @Test
    public void noIncludeCategoryAnnotation() {
        Result testResult= JUnitCore.runClasses(NoIncludeCategoryAnnotationSuite.class);
        assertTrue(testResult.wasSuccessful());
        assertEquals(1, testResult.getRunCount());
    }

    @RunWith(Categories.class)
    @Categories.IncludeCategory(CharSequence.class)
View Full Code Here

Examples of org.junit.runner.Result.wasSuccessful()

    }

    @Test
    public void sameAsNoIncludeCategoryAnnotation() {
        Result testResult= JUnitCore.runClasses(SameAsNoIncludeCategoryAnnotationSuite.class);
        assertTrue(testResult.wasSuccessful());
        assertEquals(1, testResult.getRunCount());
    }
}
View Full Code Here

Examples of org.junit.runner.Result.wasSuccessful()

    }

    @Test
    public void testsRunInParallel() {
        Result result = JUnitCore.runClasses(ParallelComputer.classes(), Example1.class, Example2.class);
        assertTrue(result.wasSuccessful());
        assertNotNull(fExample1One);
        assertNotNull(fExample1Two);
        assertNotNull(fExample2One);
        assertNotNull(fExample2Two);
        assertThat(fExample1One, is(fExample1Two));
View Full Code Here

Examples of org.junit.runner.Result.wasSuccessful()

    }

    @Test
    public void subclassWithOnlyInheritedTestsRuns() {
        Result result = JUnitCore.runClasses(Sub.class);
        assertTrue(result.wasSuccessful());
    }

    public static class SubWithBefore extends Super {
        @Before
        public void gack() {
View Full Code Here

Examples of org.junit.runner.Result.wasSuccessful()

    public void inheritanceAllAny() {//all included, any excluded
        Result testResult= JUnitCore.runClasses(InheritanceAllAny.class);
        assertThat("unexpected run count", testResult.getRunCount(), is(equalTo(1)));
        assertThat("unexpected failure count", testResult.getFailureCount(), is(equalTo(1)));
        assertThat("unexpected failure count", testResult.getIgnoreCount(), is(equalTo(0)));
        assertFalse(testResult.wasSuccessful());
    }

    public static class X implements A {}
    public static class Y implements B {}
    public static class Z implements A, B {}
View Full Code Here

Examples of org.junit.runner.Result.wasSuccessful()

    }

    @Test
    public void testsRunInParallel() {
        Result result = JUnitCore.runClasses(ParallelComputer.methods(), Example.class);
        assertTrue(result.wasSuccessful());
        assertNotNull(fOne);
        assertNotNull(fTwo);
        assertThat(fOne, is(not(fTwo)));
    }
}
View Full Code Here

Examples of org.junit.runner.Result.wasSuccessful()

    }

    @Test
    public void runtimeDuringTestShouldReturnTimeSinceStart() {
        Result result = runTest(DurationDuringTestTest.class);
        assertTrue(result.wasSuccessful());
    }

  @Test
    public void runtimeAfterTestShouldReturnRunDuration() {
        Result result = runTest(DurationAfterTestTest.class);
View Full Code Here

Examples of org.junit.runner.Result.wasSuccessful()

    }

  @Test
    public void runtimeAfterTestShouldReturnRunDuration() {
        Result result = runTest(DurationAfterTestTest.class);
        assertTrue(result.wasSuccessful());
    }
}
View Full Code Here

Examples of org.junit.runner.Result.wasSuccessful()

    }

    @Test
    public void testFilterInRunnerConstructor() {
        Result result = JUnitCore.runClasses(FilteredTest.class);
        assertTrue(result.wasSuccessful());
    }
}
View Full Code Here

Examples of org.junit.runner.Result.wasSuccessful()

    @Test
    public void expected() {
        JUnitCore core = new JUnitCore();
        Result result = core.run(Expected.class);
        assertTrue(result.wasSuccessful());
    }

    public static class Unexpected {
        @Test(expected = Exception.class)
        public void expected() throws Exception {
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.