Package org.junit.internal.runners

Examples of org.junit.internal.runners.JUnit38ClassRunner.filter()


    public void filterSingleMethodFromOldTestClass() throws Exception {
        final Description method = Description.createTestDescription(
                TwoOldTests.class, "testOne");
        Filter filter = Filter.matchMethodDescription(method);
        JUnit38ClassRunner child = new JUnit38ClassRunner(TwoOldTests.class);
        child.filter(filter);
        assertEquals(1, child.testCount());
    }

    @Test
    public void testCountsStandUpToFiltration() {
View Full Code Here


     * Test that NoTestsRemainException is thrown when all methods have been filtered.
     */
    @Test(expected = NoTestsRemainException.class)
    public void filterNoTestsRemain() throws NoTestsRemainException {
        JUnit38ClassRunner runner = new JUnit38ClassRunner(OneTest.class);
        runner.filter(new RejectAllTestsFilter())
    }
}
View Full Code Here

  public void filterSingleMethodFromOldTestClass() throws Exception {
    final Description method= Description.createTestDescription(
        TwoOldTests.class, "testOne");
    Filter filter= Filter.matchMethodDescription(method);
    JUnit38ClassRunner child= new JUnit38ClassRunner(TwoOldTests.class);
    child.filter(filter);
    assertEquals(1, child.testCount());
  }

  @Test
  public void testCountsStandUpToFiltration() {
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.