* 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.
TestCase.assertEquals("Map sizes differ", aExpectedMap.size(), aActual
.size());
- Set<Entry<Key,Value>> expectedEntries = aExpectedMap.entrySet();
+ Set<Entry<Key, Value>> expectedEntries = aExpectedMap.entrySet();
- for (Entry<Key,Value> entry: expectedEntries) {
+ for (Entry<Key, Value> entry : expectedEntries) {
Key key = entry.getKey();
TestCase.assertTrue("Map does not containg entry for key:" + key,
aActual.containsKey(key));
LOG.info("Expected exception occured " + t.getMessage());
return; // ok
- }
+ }
throw new RuntimeException(t);
}
}