X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Ftest%2FAssertionUtils.java;h=9487f22a1d267f56402c011cbf1093f0873506ee;hb=8de36ff0206c996baf3ee4adc3e2293b12ff5f39;hp=966a52e4f4318a9f00d7ad9977f131e5f6c5a84c;hpb=89c06d4d52b46c154128c97d6e758fa1f4fc7a6e;p=utils 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 966a52e4..9487f22a 100644 --- a/support/general/src/test/java/org/wamblee/test/AssertionUtils.java +++ b/support/general/src/test/java/org/wamblee/test/AssertionUtils.java @@ -25,10 +25,9 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; - /** * Useful assertions for use in test cases. - * + * * @author Erik Brakkee */ public final class AssertionUtils { @@ -36,7 +35,7 @@ public final class AssertionUtils { /** * Disabled constructor. - * + * */ private AssertionUtils() { // Empty @@ -44,7 +43,7 @@ public final class AssertionUtils { /** * Asserts that two object arrays are equal. - * + * * @param aExpected * Expected object array. * @param aActual @@ -56,7 +55,7 @@ public final class AssertionUtils { /** * Asserts that two object arrays are equal. - * + * * @param aMsg * Message. * @param aExpected @@ -75,7 +74,7 @@ public final class AssertionUtils { } } - /** +/** * Asserts that two objects are equal, and in case the object is an Object[] * delegates to {@link #assertEquals(String, Object[], Object[]). * @@ -100,7 +99,7 @@ public final class AssertionUtils { /** * Asserts that two maps are equal by comparing all keys and by checking * that the values for the same keys are the same. - * + * * @param aMsg * Message. * @param aExpectedMap @@ -110,8 +109,8 @@ public final class AssertionUtils { */ public static void assertEquals(String aMsg, Map aExpectedMap, Map aActual) { - TestCase.assertEquals("Map sizes differ", aExpectedMap.size(), - aActual.size()); + TestCase.assertEquals("Map sizes differ", aExpectedMap.size(), aActual + .size()); Set keys = aExpectedMap.keySet(); @@ -126,9 +125,12 @@ public final class AssertionUtils { /** * Asserts that an exception occurs. - * @param aRunnable Test cases should create a subclass of this which contains the - * code that should throw an exception. - * @param aType Type of exception that is expected. + * + * @param aRunnable + * Test cases should create a subclass of this which contains the + * code that should throw an exception. + * @param aType + * Type of exception that is expected. */ public static void assertException(ErroneousCode aObject, Class aType) { try { @@ -138,7 +140,7 @@ public final class AssertionUtils { if (aType.isInstance(t)) { LOG.info("Expected exception occured " + t.getMessage()); - return; // ok + return; // ok } else { throw new RuntimeException(t); }