Example usage for junit.framework AssertionFailedError AssertionFailedError

List of usage examples for junit.framework AssertionFailedError AssertionFailedError

Introduction

In this page you can find the example usage for junit.framework AssertionFailedError AssertionFailedError.

Prototype

public AssertionFailedError() 

Source Link

Usage

From source file:com.smartitengineering.dao.impl.hibernate.AbstractDAOTest.java

private void assertEmpty(List readList) {
    if (readList != null && !readList.isEmpty()) {
        throw new AssertionFailedError();
    }//from   w w  w.  j a v a 2 s. c o m
}

From source file:org.apache.maven.plugin.surefire.report.StatelessXMLReporterTest.java

protected void setUp() throws Exception {
    super.setUp();
    reportEntry = new SimpleReportEntry(this.getClass().getName(), "StatelessXMLReporterTest",
            new LegacyPojoStackTraceWriter("", "", new AssertionFailedError()), 17);
    stats = new TestSetStats(false, true);
}

From source file:org.nuxeo.runtime.test.Failures.java

@Override
public String toString() {
    StringBuffer buffer = new StringBuffer();
    int i = 1;/* w ww .j  a  v a2 s  .co m*/
    AssertionFailedError errors = new AssertionFailedError();
    for (Failure failure : failures) {
        buffer.append("* Failure " + i + ": ").append(failure.getTestHeader()).append("\n")
                .append(failure.getTrace()).append("\n");
        errors.addSuppressed(failure.getException());
        i++;
    }
    if (errors.getSuppressed().length > 0) {
        // Log because JUnit swallows some parts of the stack trace
        log.debug(errors.getMessage(), errors);
    }
    return buffer.toString();
}