package ch.fusun.baron.player.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import org.junit.Test;
import ch.fusun.baron.player.Dynasty;
/**
* Tests dynasty domain object
*/
public class DynastyTest {
/**
* Tests if the equality function works
*/
@Test
public void testEquality() {
Dynasty dynasty = new Dynasty("Test1", null); //$NON-NLS-1$
Dynasty dynasty2 = new Dynasty("Test2", null); //$NON-NLS-1$
Dynasty dynasty3 = new Dynasty("Test1", null); //$NON-NLS-1$
assertEquals(dynasty, dynasty3);
assertFalse(dynasty.equals(dynasty2));
assertFalse(dynasty.equals(null));
assertFalse(dynasty.equals(new String("Test1"))); //$NON-NLS-1$
}
}