Package junit.framework

Examples of junit.framework.JUnit4TestAdapter.run()


  }
 
  public void testInvalidMethod() {
    TestResult result= new TestResult();
    junit.framework.Test adapter= new JUnit4TestAdapter(InvalidMethodTest.class);
    adapter.run(result);
    assertEquals(1, result.errorCount())
    TestFailure failure= result.errors().nextElement();
    assertTrue(failure.exceptionMessage().contains("Method shouldBeStatic() should be static"));
  }
 
View Full Code Here


 
  public void testRunWithClass() {
    wasRun= false;
    TestResult result= new TestResult();
    junit.framework.Test adapter= new JUnit4TestAdapter(NoTests.class);
    adapter.run(result);
    assertTrue(wasRun);
  }
 
  public void testToStringSuite() {
    junit.framework.Test adapter= new JUnit4TestAdapter(NoTests.class);
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.