[jboss-cvs] JBossAS SVN: r62623 - projects/test/trunk/src/main/java/org/jboss/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Apr 28 04:50:20 EDT 2007
Author: alesj
Date: 2007-04-28 04:50:20 -0400 (Sat, 28 Apr 2007)
New Revision: 62623
Modified:
projects/test/trunk/src/main/java/org/jboss/test/AbstractTestCase.java
Log:
Raise failure method.
Modified: projects/test/trunk/src/main/java/org/jboss/test/AbstractTestCase.java
===================================================================
--- projects/test/trunk/src/main/java/org/jboss/test/AbstractTestCase.java 2007-04-28 05:49:37 UTC (rev 62622)
+++ projects/test/trunk/src/main/java/org/jboss/test/AbstractTestCase.java 2007-04-28 08:50:20 UTC (rev 62623)
@@ -278,6 +278,22 @@
}
/**
+ * Raise an assertion failed error for an error
+ *
+ * @param reason the reason
+ * @param cause the cause
+ */
+ protected void failure(String reason, Throwable cause)
+ {
+ getLog().error(reason, cause);
+ if (cause instanceof AssertionFailedError)
+ throw (AssertionFailedError) cause;
+ Error error = new AssertionFailedError(reason);
+ error.initCause(cause);
+ throw error;
+ }
+
+ /**
* Log an event with the given context
*
* @param context the context
More information about the jboss-cvs-commits
mailing list