use of com.iluwatar.factorykit.Weapon in project java-design-patterns by iluwatar.
the class FactoryKitTest method testAxeWeapon.
/**
* Testing {@link WeaponFactory} to produce a AXE asserting that the Weapon is an instance of {@link Axe}
*/
@Test
public void testAxeWeapon() {
Weapon weapon = factory.create(WeaponType.AXE);
verifyWeapon(weapon, Axe.class);
}
use of com.iluwatar.factorykit.Weapon in project java-design-patterns by iluwatar.
the class FactoryKitTest method testSpearWeapon.
/**
* Testing {@link WeaponFactory} to produce a SPEAR asserting that the Weapon is an instance of {@link Spear}
*/
@Test
public void testSpearWeapon() {
Weapon weapon = factory.create(WeaponType.SPEAR);
verifyWeapon(weapon, Spear.class);
}
use of com.iluwatar.factorykit.Weapon in project java-design-patterns by iluwatar.
the class FactoryKitTest method testWeapon.
/**
* Testing {@link WeaponFactory} to produce a SWORD asserting that the Weapon is an instance of {@link Sword}
*/
@Test
public void testWeapon() {
Weapon weapon = factory.create(WeaponType.SWORD);
verifyWeapon(weapon, Sword.class);
}