public String getName() { return createTestName(testMethod); }
public String toString() { return name(); }
protected static String removePrefix(final String name) { return removePrefix(standardPrefix, name); }
/** * Runs a test and collects its result in a TestResult instance. */ public void run(final TestResult result) { try { setUp(); } catch (final Exception e) { e.printStackTrace(); final Test test = new TestSetup(); result.addError(test, e); return; } for (final Method testMethod : testMethods) { run(result, testMethod); } try { tearDown(); } catch (final Exception e) { e.printStackTrace(); final Test test = new TestTearDown(); result.addError(test, e); } }
protected String createTestName(final Method testMethod) { return name() + removePrefix(testMethod.getName()); }
protected void run(final TestResult result, final Method testMethod) { final Test test = createTest(testMethod); result.startTest(test); final Protectable p = new Protectable() { public void protect() throws Throwable { runTestMethod(testMethod); } }; //System.out.println(">>" + NumberedTestCase.class.getName() + "> started: " + testMethod.toGenericString()); result.runProtected(test, p); result.endTest(test); //System.out.println(">>" + NumberedTestCase.class.getName() + "> done: " + testMethod.toGenericString()); }
public void protect() throws Throwable { runTestMethod(testMethod); } };
/** * Runs a test and collects its result in a TestResult instance. */ public void run(TestResult result) { try{ setUp(); } catch (Exception e){ e.printStackTrace(); Test test = new TestSetup(); result.addError(test, e); return; } for (int i=0; i < testMethods.length; i++){ run(result, testMethods[i]); } try{ tearDown(); } catch (Exception e){ e.printStackTrace(); Test test = new TestTearDown(); result.addError(test, e); return; } }
protected String createTestName(Method testMethod){ return name() + removePrefix(testMethod.getName()); }
protected void run(final TestResult result, final Method testMethod) { Test test = createTest(testMethod); result.startTest(test); Protectable p= new Protectable() { public void protect() throws Throwable { runTestMethod(testMethod); } }; result.runProtected(test, p); result.endTest(test); }
public void protect() throws Throwable { runTestMethod(testMethod); } };
public String toString(){ return name(); }
protected static String removePrefix(String name){ return removePrefix(standardPrefix, name); }
public String getName() { return createTestName(testMethod); }
public String getName() { return name() + ".tearDown()"; }
public String getName(){ return name()+".tearDown()"; }
public String getName(){ return name()+".setUp()"; }
public String getName() { return name() + ".setUp()"; }