Package junit.framework

Examples of junit.framework.TestResult.addError()


                    tr.addError(theClazz, cause);
                } else {
                    tr.addError(theClazz, e);
                }
            } catch (IllegalAccessException e) {
                tr.addError(theClazz, e);
            } catch (IllegalArgumentException e) {
                tr.addError(theClazz, e);
            }
            if ( !tr.wasSuccessful() ){
                sresult.setSuccessful(false);
View Full Code Here


                    tr.addError(theClazz, e);
                }
            } catch (IllegalAccessException e) {
                tr.addError(theClazz, e);
            } catch (IllegalArgumentException e) {
                tr.addError(theClazz, e);
            }
            if ( !tr.wasSuccessful() ){
                sresult.setSuccessful(false);
                StringBuilder buf = new StringBuilder();
                StringBuilder buftrace = new StringBuilder();
View Full Code Here

      // Run the bundle suites
      for (Test test : tests) {
        test.run(result);
      }
    } catch (Exception e) {
      result.addError(null, e);
    } finally {
      reporter.end();
      log.info("Testing complete.");
      maybeKillFramework();
    }
View Full Code Here

                    AssertionFailedError afe = new AssertionFailedError(cause.toString());
                    // copy the original stack trace
                    afe.setStackTrace(cause.getStackTrace());
                    tr.addFailure(theClazz, afe);
                } else if (cause != null) {
                    tr.addError(theClazz, cause);
                } else {
                    tr.addError(theClazz, e);
                }
            } catch (IllegalAccessException e) {
                tr.addError(theClazz, e);
View Full Code Here

                    afe.setStackTrace(cause.getStackTrace());
                    tr.addFailure(theClazz, afe);
                } else if (cause != null) {
                    tr.addError(theClazz, cause);
                } else {
                    tr.addError(theClazz, e);
                }
            } catch (IllegalAccessException e) {
                tr.addError(theClazz, e);
            } catch (IllegalArgumentException e) {
                tr.addError(theClazz, e);
View Full Code Here

                    tr.addError(theClazz, cause);
                } else {
                    tr.addError(theClazz, e);
                }
            } catch (IllegalAccessException e) {
                tr.addError(theClazz, e);
            } catch (IllegalArgumentException e) {
                tr.addError(theClazz, e);
            }
            if ( !tr.wasSuccessful() ){
                sresult.setSuccessful(false);
View Full Code Here

                    tr.addError(theClazz, e);
                }
            } catch (IllegalAccessException e) {
                tr.addError(theClazz, e);
            } catch (IllegalArgumentException e) {
                tr.addError(theClazz, e);
            }
            if ( !tr.wasSuccessful() ){
                sresult.setSuccessful(false);
                StringBuilder buf = new StringBuilder();
                StringBuilder buftrace = new StringBuilder();
View Full Code Here

        final TestResult result = new TestResult();
        RunNotifier notifier = new RunNotifier();
        notifier.addListener(new RunListener() {

            public void testFailure(Failure failure) throws Exception {
                result.addError(asTest(failure.getDescription()), failure.getException());
            }

            public void testFinished(Description description)
                    throws Exception {
                result.endTest(asTest(description));
View Full Code Here

    }
    // exceptions thrown by osgiSetUp/osgiTearDown
    catch (Exception ex) {
      log.error("test exception threw exception ", ex);
      result.addError((Test) rawTest, ex);
    }
    return result;
  }
}
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.