Merge pull request #652 from yosfik/master

Fix FactoryMethodTest and PrototypeTest
This commit is contained in:
Ilkka Seppälä 2017-10-12 17:13:57 +03:00 committed by GitHub
commit dfb43299a8
2 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ public class FactoryMethodTest {
*/ */
private void verifyWeapon(Weapon weapon, WeaponType expectedWeaponType, Class<?> clazz) { private void verifyWeapon(Weapon weapon, WeaponType expectedWeaponType, Class<?> clazz) {
assertTrue("Weapon must be an object of: " + clazz.getName(), clazz.isInstance(weapon)); 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()); weapon.getWeaponType());
} }
} }

View File

@ -56,7 +56,7 @@ public class PrototypeTest<P extends Prototype> {
/** /**
* The tested prototype instance * The tested prototype instance
*/ */
private final Prototype testedPrototype; private final P testedPrototype;
/** /**
* The expected {@link Prototype#toString()} value * The expected {@link Prototype#toString()} value
@ -69,7 +69,7 @@ public class PrototypeTest<P extends Prototype> {
* @param testedPrototype The tested prototype instance * @param testedPrototype The tested prototype instance
* @param expectedToString The expected {@link Prototype#toString()} value * @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.expectedToString = expectedToString;
this.testedPrototype = testedPrototype; this.testedPrototype = testedPrototype;
} }