git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
baseline uplifts
[utils]
/
support
/
general
/
src
/
test
/
java
/
org
/
wamblee
/
test
/
AssertionUtils.java
diff --git
a/support/general/src/test/java/org/wamblee/test/AssertionUtils.java
b/support/general/src/test/java/org/wamblee/test/AssertionUtils.java
index 824620418797fc7c42dc2688457c789b6a85a325..07caaa93d8d806a999d4a18749620ef1371cbe41 100644
(file)
--- a/
support/general/src/test/java/org/wamblee/test/AssertionUtils.java
+++ b/
support/general/src/test/java/org/wamblee/test/AssertionUtils.java
@@
-22,6
+22,9
@@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map;
import java.util.Set;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import junit.framework.TestCase;
/**
import junit.framework.TestCase;
/**
@@
-30,6
+33,8
@@
import junit.framework.TestCase;
* @author Erik Brakkee
*/
public final class AssertionUtils {
* @author Erik Brakkee
*/
public final class AssertionUtils {
+
+ private static final Log LOG = LogFactory.getLog(AssertionUtils.class);
/**
* Disabled constructor.
/**
* Disabled constructor.
@@
-64,7
+69,9
@@
public final class AssertionUtils {
*/
public static <T> void assertEquals(String aMsg, T[] aExpected,
T[] aActual) {
*/
public static <T> void assertEquals(String aMsg, T[] aExpected,
T[] aActual) {
- TestCase.assertEquals(aMsg + ": Array lengths ", aExpected.length,
+ TestCase.assertEquals(aMsg + " expected " +
+ Arrays.asList(aExpected) + ", actual " +
+ Arrays.asList(aActual) + ": Array lengths ", aExpected.length,
aActual.length);
for (int i = 0; i < aExpected.length; i++) {
aActual.length);
for (int i = 0; i < aExpected.length; i++) {
@@
-140,6
+147,7
@@
public final class AssertionUtils {
throw new RuntimeException("No exception occurred");
} catch (Throwable t) {
if ( aType.isInstance(t)) {
throw new RuntimeException("No exception occurred");
} catch (Throwable t) {
if ( aType.isInstance(t)) {
+ LOG.info("Expected exception occured " + t.getMessage());
return; // ok
}
else {
return; // ok
}
else {