From 56ba78a5e905bd6d049d3d17554e9f6e24d198a4 Mon Sep 17 00:00:00 2001 From: Yosfik Alqadri Date: Sat, 7 Oct 2017 20:33:24 +0700 Subject: [PATCH 1/2] fix test message --- .../java/com/iluwatar/factory/method/FactoryMethodTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/factory-method/src/test/java/com/iluwatar/factory/method/FactoryMethodTest.java b/factory-method/src/test/java/com/iluwatar/factory/method/FactoryMethodTest.java index 4f3a5930d..69736855c 100644 --- a/factory-method/src/test/java/com/iluwatar/factory/method/FactoryMethodTest.java +++ b/factory-method/src/test/java/com/iluwatar/factory/method/FactoryMethodTest.java @@ -95,7 +95,7 @@ public class FactoryMethodTest { */ private void verifyWeapon(Weapon weapon, WeaponType expectedWeaponType, Class clazz) { assertTrue("Weapon must be an object of: " + clazz.getName(), clazz.isInstance(weapon)); - assertEquals("Weapon must be of weaponType: " + clazz.getName(), expectedWeaponType, + assertEquals("Weapon must be of weaponType: " + expectedWeaponType, expectedWeaponType, weapon.getWeaponType()); } } From ed1852a789daeef03ab260ef4f962bca9160d13e Mon Sep 17 00:00:00 2001 From: Yosfik Alqadri Date: Sun, 8 Oct 2017 20:41:28 +0700 Subject: [PATCH 2/2] Fix unused generic type in PrototypeTest --- .../src/test/java/com/iluwatar/prototype/PrototypeTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prototype/src/test/java/com/iluwatar/prototype/PrototypeTest.java b/prototype/src/test/java/com/iluwatar/prototype/PrototypeTest.java index add5617b1..839f27bc7 100644 --- a/prototype/src/test/java/com/iluwatar/prototype/PrototypeTest.java +++ b/prototype/src/test/java/com/iluwatar/prototype/PrototypeTest.java @@ -56,7 +56,7 @@ public class PrototypeTest

{ /** * The tested prototype instance */ - private final Prototype testedPrototype; + private final P testedPrototype; /** * The expected {@link Prototype#toString()} value @@ -69,7 +69,7 @@ public class PrototypeTest

{ * @param testedPrototype The tested prototype instance * @param expectedToString The expected {@link Prototype#toString()} value */ - public PrototypeTest(final Prototype testedPrototype, final String expectedToString) { + public PrototypeTest(final P testedPrototype, final String expectedToString) { this.expectedToString = expectedToString; this.testedPrototype = testedPrototype; }