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
@@ -23,14 +23,12 @@
|
||||
|
||||
package com.iluwatar.flyweight;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:54 PM
|
||||
*
|
||||
@@ -39,18 +37,18 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
public class AlchemistShopTest {
|
||||
|
||||
@Test
|
||||
public void testShop() throws Exception {
|
||||
final AlchemistShop shop = new AlchemistShop();
|
||||
public void testShop() {
|
||||
final var shop = new AlchemistShop();
|
||||
|
||||
final List<Potion> bottomShelf = shop.getBottomShelf();
|
||||
final var bottomShelf = shop.getBottomShelf();
|
||||
assertNotNull(bottomShelf);
|
||||
assertEquals(5, bottomShelf.size());
|
||||
|
||||
final List<Potion> topShelf = shop.getTopShelf();
|
||||
final var topShelf = shop.getTopShelf();
|
||||
assertNotNull(topShelf);
|
||||
assertEquals(8, topShelf.size());
|
||||
|
||||
final List<Potion> allPotions = new ArrayList<>();
|
||||
final var allPotions = new ArrayList<Potion>();
|
||||
allPotions.addAll(topShelf);
|
||||
allPotions.addAll(bottomShelf);
|
||||
|
||||
|
@@ -26,15 +26,12 @@ package com.iluwatar.flyweight;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* Application test
|
||||
*
|
||||
*/
|
||||
public class AppTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
String[] args = {};
|
||||
App.main(args);
|
||||
App.main(new String[]{});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user