Java 11 migration: patterns (remaining b-c) (#1081)

* Moves business-delegate pattern  to java 11

* Moves bytecode pattern  to java 11

* Moves caching pattern  to java 11

* Moves callback pattern  to java 11

* Moves chain pattern  to java 11

* Moves circuit-breaker pattern  to java 11

* Moves collection-pipeline pattern  to java 11

* Moves command pattern  to java 11

* Moves commander pattern  to java 11

* Moves composite pattern  to java 11

* Corrects test cases
This commit is contained in:
Anurag Agarwal
2019-11-13 01:26:46 +05:30
committed by Ilkka Seppälä
parent 6ef840f3cf
commit 33ea7335b1
63 changed files with 798 additions and 979 deletions

View File

@@ -26,15 +26,12 @@ package com.iluwatar.composite;
import org.junit.jupiter.api.Test;
/**
*
* Application test
*
*/
public class AppTest {
@Test
public void test() {
String[] args = {};
App.main(args);
App.main(new String[]{});
}
}

View File

@@ -72,7 +72,7 @@ public class MessengerTest {
*/
@Test
public void testMessageFromOrcs() {
final Messenger messenger = new Messenger();
final var messenger = new Messenger();
testMessage(
messenger.messageFromOrcs(),
"Where there is a whip there is a way."
@@ -84,7 +84,7 @@ public class MessengerTest {
*/
@Test
public void testMessageFromElves() {
final Messenger messenger = new Messenger();
final var messenger = new Messenger();
testMessage(
messenger.messageFromElves(),
"Much wind pours from your mouth."
@@ -99,7 +99,7 @@ public class MessengerTest {
*/
private void testMessage(final LetterComposite composedMessage, final String message) {
// Test is the composed message has the correct number of words
final String[] words = message.split(" ");
final var words = message.split(" ");
assertNotNull(composedMessage);
assertEquals(words.length, composedMessage.count());