Package junit.framework

Examples of junit.framework.JUnit4TestAdapter


    List<? extends junit.framework.Test> tests= adapter.getTests();
    assertEquals(2, tests.size());
  }
 
  @Test public void forwardCompatibilityWorksWithTestCount() {
    JUnit4TestAdapter adapter= new JUnit4TestAdapter(All.class);
    assertEquals(2, adapter.countTestCases());
  }
View Full Code Here


    Result result= JUnitCore.runClasses(Hydra.class);
    assertEquals(2, result.getFailureCount());
  }
 
  public static junit.framework.Test suite() {
    return new JUnit4TestAdapter(SuiteTest.class);
  }
View Full Code Here

    Result second= core.run(OneTest.class);
    assertNotSame(first, second);
  }
 
  public static junit.framework.Test suite() {
    return new JUnit4TestAdapter(TestListenerTest.class);
  }
View Full Code Here

      Assert.fail();
    }
  }
 
  @Test public void canUnadaptAnAdapter() {
    OldTestClassRunner runner= new OldTestClassRunner(new JUnit4TestAdapter(AnnotatedTest.class));
    Result result= new JUnitCore().run(runner);
    Failure failure= result.getFailures().get(0);
    assertEquals(Description.createTestDescription(AnnotatedTest.class, "foo"), failure.getDescription());
  }
View Full Code Here

    assertTrue(writer.toString().contains("infiniteLoop")); // Make sure we have the stalled frame on the stack somewhere
  }

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

    new JUnit4TestAdapter(InfiniteLoopTest.class).run(result);
    assertEquals(1, result.errorCount());
  }
 
  static public junit.framework.Test suite() {
    return new JUnit4TestAdapter(TimeoutTest.class);
  }
View Full Code Here

    JUnitCore.runClasses(Count.class, Count.class);
    assertEquals(2, fCount);   
  }

  static public junit.framework.Test suite() {
    return new JUnit4TestAdapter(CommandLineTest.class);
  }
View Full Code Here

    while((input.read()) != -1);
    assertEquals(returnCode, process.waitFor());
  }

  public static junit.framework.Test suite() {
    return new JUnit4TestAdapter(JUnitCoreTest.class);
  }
View Full Code Here

  }
 
  public void testCompatibility() {
    fLog= "";
    TestResult result= new TestResult();
    junit.framework.Test adapter= new JUnit4TestAdapter(NewTest.class);
    adapter.run(result);
    assertEquals("before test after ", fLog);
  }
View Full Code Here

    adapter.run(result);
    assertEquals("before test after ", fLog);
  }
 
  public void testToString() {
    JUnit4TestAdapter adapter= new JUnit4TestAdapter(NewTest.class);
    junit.framework.Test test= adapter.getTests().get(0);
    assertEquals(String.format("test(%s)", NewTest.class.getName()), test.toString());
  }
View Full Code Here

TOP

Related Classes of junit.framework.JUnit4TestAdapter

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.