Migrate to JUnit5
This commit is contained in:
		@@ -22,7 +22,7 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.iluwatar.doubledispatch;
 | 
			
		||||
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
import org.junit.jupiter.api.Test;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 
 | 
			
		||||
@@ -22,10 +22,10 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.iluwatar.doubledispatch;
 | 
			
		||||
 | 
			
		||||
import static org.junit.Assert.assertEquals;
 | 
			
		||||
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertEquals;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Date: 12/10/15 - 8:37 PM
 | 
			
		||||
 * Test for Collision
 | 
			
		||||
@@ -86,7 +86,7 @@ public abstract class CollisionTest<O extends GameObject> {
 | 
			
		||||
        ? "Expected [" + targetName + "] to be on fire after colliding with [" + otherName + "] but it was not!"
 | 
			
		||||
        : "Expected [" + targetName + "] not to be on fire after colliding with [" + otherName + "] but it was!";
 | 
			
		||||
 | 
			
		||||
    assertEquals(errorMessage, expectTargetOnFire, target.isOnFire());
 | 
			
		||||
    assertEquals(expectTargetOnFire, target.isOnFire(), errorMessage);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@@ -105,7 +105,7 @@ public abstract class CollisionTest<O extends GameObject> {
 | 
			
		||||
        ? "Expected [" + targetName + "] to be damaged after colliding with [" + otherName + "] but it was not!"
 | 
			
		||||
        : "Expected [" + targetName + "] not to be damaged after colliding with [" + otherName + "] but it was!";
 | 
			
		||||
 | 
			
		||||
    assertEquals(errorMessage, expectedDamage, target.isDamaged());
 | 
			
		||||
    assertEquals(expectedDamage, target.isDamaged(), errorMessage);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -22,11 +22,11 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.iluwatar.doubledispatch;
 | 
			
		||||
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
import org.junit.jupiter.api.Test;
 | 
			
		||||
 | 
			
		||||
import static org.junit.Assert.assertEquals;
 | 
			
		||||
import static org.junit.Assert.assertFalse;
 | 
			
		||||
import static org.junit.Assert.assertTrue;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertEquals;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertFalse;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertTrue;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Date: 12/10/15 - 11:31 PM
 | 
			
		||||
 
 | 
			
		||||
@@ -22,10 +22,10 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.iluwatar.doubledispatch;
 | 
			
		||||
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
import org.junit.jupiter.api.Test;
 | 
			
		||||
 | 
			
		||||
import static org.junit.Assert.assertEquals;
 | 
			
		||||
import static org.junit.Assert.assertFalse;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertEquals;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertFalse;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Date: 12/10/15 - 11:31 PM
 | 
			
		||||
 
 | 
			
		||||
@@ -22,11 +22,11 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.iluwatar.doubledispatch;
 | 
			
		||||
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
import org.junit.jupiter.api.Test;
 | 
			
		||||
 | 
			
		||||
import static junit.framework.TestCase.assertEquals;
 | 
			
		||||
import static org.junit.Assert.assertFalse;
 | 
			
		||||
import static org.junit.Assert.assertTrue;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertEquals;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertFalse;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertTrue;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Unit test for Rectangle
 | 
			
		||||
 
 | 
			
		||||
@@ -22,10 +22,10 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.iluwatar.doubledispatch;
 | 
			
		||||
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
import org.junit.jupiter.api.Test;
 | 
			
		||||
 | 
			
		||||
import static org.junit.Assert.assertEquals;
 | 
			
		||||
import static org.junit.Assert.assertFalse;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertEquals;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertFalse;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Date: 12/10/15 - 11:31 PM
 | 
			
		||||
 
 | 
			
		||||
@@ -22,10 +22,10 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.iluwatar.doubledispatch;
 | 
			
		||||
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
import org.junit.jupiter.api.Test;
 | 
			
		||||
 | 
			
		||||
import static org.junit.Assert.assertEquals;
 | 
			
		||||
import static org.junit.Assert.assertFalse;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertEquals;
 | 
			
		||||
import static org.junit.jupiter.api.Assertions.assertFalse;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Date: 12/10/15 - 11:31 PM
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user