package com.alexrnl.commons.utils.object;

import static org.junit.Assert.fail;

import org.junit.Before;
import org.junit.Test;

/**
 * Test suite for the {@link ComparisonError} class.
 * @author Alex
 */
public class ComparisonErrorTest {
	
	/**
	 * Set up attributes.
	 */
	@Before
	public void setUp () {
	}
	
	/**
	 * Test method for {@link java.lang.Throwable#getMessage()}.
	 */
	@Test
	public void testGetMessage () {
		fail("Not yet implemented"); // TODO
	}
	
	/**
	 * Test method for {@link java.lang.Throwable#getCause()}.
	 */
	@Test
	public void testGetCause () {
		fail("Not yet implemented"); // TODO
	}
}

@@ -71,22 +71,29 @@
 ert.
-fail;%0A
+assertEquals;
 %0Aimport 
 org.
@@ -80,32 +80,39 @@
 tEquals;%0Aimport 
+static 
 org.junit.Before
@@ -109,15 +109,27 @@
 nit.
-Before;
+Assert.assertNull;%0A
 %0Aimp
@@ -265,383 +265,1206 @@
 t %7B%0A
-%09%0A
 %09/**
-%0A%09 * Set up attributes.%0A%09 */%0A%09@Before%0A%09public void setUp () %7B%0A%09%7D%0A%09%0A%09/**%0A%09 * Test method for %7B@link java.lang.Throwable#getMessage()%7D.%0A%09 */%0A%09@Test%0A%09public void testGetMessage () %7B%0A%09%09fail(%22Not yet implemented%22); // TODO%0A%09%7D%0A%09%0A%09/**%0A%09 * Test method for %7B@link java.lang.Throwable#getCause()%7D.%0A%09 */%0A%09@Test%0A%09public void testGetCause () %7B%0A%09%09fail(%22Not yet implemented%22); // TODO
+ A blank error */%0A%09private final ComparisonError%09blank%09%09%09= new ComparisonError();%0A%09/** An error with a message */%0A%09private final ComparisonError%09message%09%09%09= new ComparisonError(%22Error while comparing Integer%22);%0A%09/** An error with a code */%0A%09private final ComparisonError%09cause%09%09%09= new ComparisonError(new RuntimeException());%0A%09/** An error with a message and a code */%0A%09private final ComparisonError%09messageAndCause%09= new ComparisonError(%22Error while comparing Dummy%22, new NullPointerException());%0A%09%0A%09/**%0A%09 * Test method for %7B@link java.lang.Throwable#getMessage()%7D.%0A%09 */%0A%09@Test%0A%09public void testGetMessage () %7B%0A%09%09assertNull(blank.getMessage());%0A%09%09assertEquals(%22Error while comparing Integer%22, message.getMessage());%0A%09%09assertEquals(RuntimeException.class.getName(), cause.getMessage());%0A%09%09assertEquals(%22Error while comparing Dummy%22, messageAndCause.getMessage());%0A%09%7D%0A%09%0A%09/**%0A%09 * Test method for %7B@link java.lang.Throwable#getCause()%7D.%0A%09 */%0A%09@Test%0A%09public void testGetCause () %7B%0A%09%09assertNull(blank.getCause());%0A%09%09assertNull(message.getCause());%0A%09%09assertEquals(RuntimeException.class, cause.getCause().getClass());%0A%09%09assertEquals(NullPointerException.class, messageAndCause.getCause().getClass());
 %0A%09%7D%0A

Implement tests of ComparisonError class