Java 11 migrate 7 remaining f (#1115)
* Moves facade to Java 11 * Moves factory-kit to Java 11 * Moves factory-method to Java 11 * Moves feature-toggle to Java 11 * Moves fluentinterface to Java 11 * Moves flux to Java 11 * Moves flyweight to Java 11 * Moves front-controller to Java 11 * Uses stream properly * Resolves issues with ci
This commit is contained in:
committed by
Ilkka Seppälä
parent
f835d3d516
commit
670c4e43f3
@@ -33,8 +33,7 @@ public class AppTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
String[] args = {};
|
||||
App.main(args);
|
||||
App.main(new String[]{});
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,8 @@
|
||||
|
||||
package com.iluwatar.factorykit.factorykit;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import com.iluwatar.factorykit.Axe;
|
||||
import com.iluwatar.factorykit.Spear;
|
||||
import com.iluwatar.factorykit.Sword;
|
||||
@@ -32,10 +34,8 @@ import com.iluwatar.factorykit.WeaponType;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* Test Factory Kit Pattern
|
||||
/**
|
||||
* Test Factory Kit Pattern
|
||||
*/
|
||||
public class FactoryKitTest {
|
||||
|
||||
@@ -51,30 +51,33 @@ public class FactoryKitTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing {@link WeaponFactory} to produce a SPEAR asserting that the Weapon is an instance of {@link Spear}
|
||||
* 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);
|
||||
var weapon = factory.create(WeaponType.SPEAR);
|
||||
verifyWeapon(weapon, Spear.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing {@link WeaponFactory} to produce a AXE asserting that the Weapon is an instance of {@link Axe}
|
||||
* 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);
|
||||
var weapon = factory.create(WeaponType.AXE);
|
||||
verifyWeapon(weapon, Axe.class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Testing {@link WeaponFactory} to produce a SWORD asserting that the Weapon is an instance of {@link Sword}
|
||||
* 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);
|
||||
var weapon = factory.create(WeaponType.SWORD);
|
||||
verifyWeapon(weapon, Sword.class);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user