Package junit.framework

Examples of junit.framework.JUnit4TestAdapter


    private int maxWaitTime = 10000;

    public HostPanelTest() {}

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


    DigesterParameterFactoryMapsTest.class,
    DigesterParameterFactorySetsTest.class,
    DigesterParameterFactoryMixedCollectionsTest.class })
public class AllTests {
  public static Test suite() {
    return new JUnit4TestAdapter(AllTests.class);
  }
View Full Code Here

  }

  private JUnit4TestAdapter fAdapter;
 
  @Before public void createAdapter() {
    fAdapter= new JUnit4TestAdapter(
        CantInitializeTests.class);
  }
View Full Code Here

    assertTrue(log.contains("run"));
  }

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

    assertEquals(2, result.getIgnoreCount());
  }

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

    List<Throwable> errors= validator.validateAllMethods();
    assertEquals(1, errors.size());
  }
 
  public static junit.framework.Test suite() {
    return new JUnit4TestAdapter(TestMethodTest.class);
  }
View Full Code Here

    assertEquals(4, result.getIgnoreCount());
  }

  @Test public void prerequsitesRunnerCompatibility() {
    TestResult result = new TestResult();
    JUnit4TestAdapter adapter = new AnnotationHandlingJUnit4TestAdapter(APrereqTest.class);
    adapter.run(result);
    assertEquals(1+4, result.runCount());
    assertEquals(0, result.errorCount());
    assertEquals(0, result.failureCount());
  }
View Full Code Here

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

  @Test public void prerequsitesRunnerInternalFailCompatibility() {
    TestResult result = new TestResult();
    JUnit4TestAdapter adapter = new AnnotationHandlingJUnit4TestAdapter(APrereqInternalFailTest.class);
    adapter.run(result);
    assertEquals(0, result.runCount());
    assertEquals(6, result.errorCount());
    // internal errors are reported as failures
    assertEquals(0, result.failureCount());
  }
View Full Code Here

    Runner runner= Request.aClass(All.class).getRunner();
    assertEquals(2, runner.testCount());
  }
 
  @Test public void ensureSuitesWorkWithForwardCompatibility() {
    junit.framework.Test test= new JUnit4TestAdapter(All.class);
    TestResult result= new TestResult();
    test.run(result);
    assertEquals(2, result.runCount());
  }
View Full Code Here

    test.run(result);
    assertEquals(2, result.runCount());
  }

  @Test public void forwardCompatibilityWorksWithGetTests() {
    JUnit4TestAdapter adapter= new JUnit4TestAdapter(All.class);
    List<? extends junit.framework.Test> tests= adapter.getTests();
    assertEquals(2, tests.size());
  }
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.