X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Ftest%2FAssertionUtils.java;h=bd55115b66a9778b6e5b0d6262f53bf6a733a9c0;hb=36320098ebdbe884869a9e04682a8a0291d25600;hp=8c25fc13f6963646653ee3cab510c6d622899b2e;hpb=1ea1bbf488c2f3fa2c34d9859d69eeb0d484695e;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 8c25fc13..bd55115b 100644 --- a/support/general/src/test/java/org/wamblee/test/AssertionUtils.java +++ b/support/general/src/test/java/org/wamblee/test/AssertionUtils.java @@ -12,26 +12,25 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ package org.wamblee.test; import java.util.Arrays; import java.util.Map; import java.util.Set; import java.util.Map.Entry; +import java.util.logging.Logger; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - /** * Useful assertions for use in test cases. * * @author Erik Brakkee */ public final class AssertionUtils { - private static final Log LOG = LogFactory.getLog(AssertionUtils.class); + private static final Logger LOG = Logger.getLogger(AssertionUtils.class + .getName()); /** * Disabled constructor. @@ -112,9 +111,9 @@ public final class AssertionUtils { TestCase.assertEquals("Map sizes differ", aExpectedMap.size(), aActual .size()); - Set> expectedEntries = aExpectedMap.entrySet(); + Set> expectedEntries = aExpectedMap.entrySet(); - for (Entry entry: expectedEntries) { + for (Entry entry : expectedEntries) { Key key = entry.getKey(); TestCase.assertTrue("Map does not containg entry for key:" + key, aActual.containsKey(key)); @@ -141,9 +140,8 @@ public final class AssertionUtils { LOG.info("Expected exception occured " + t.getMessage()); return; // ok - } else { - throw new RuntimeException(t); } + throw new RuntimeException(t); } }