Code example for ComparisonFailure

0
	// ** Extensiones a JUnit 
	// ******************************************************** 
 
	public void assertDeepEquals(String message, Object o1, Object o2) {
		if (!DeepComparable.Utils.compare(o1, o2)) {
			throw new ComparisonFailure(message, StringUtils.toString(o1), StringUtils.toString(o2));
		} 
	} 
 
	protected <T> void assertContains(String message, T element, Collection<T> col) {
		assertTrue(message, col.contains(element));
	} 
 
	protected void assertContains(String message, Object element, Map<?, ?> col) {
		assertTrue(message, col.containsValue(element));
	} 
 
	protected void assertNotEmpty(Collection<?> col) {
		assertFalse(col.isEmpty());
	}