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:
committed by
Ilkka Seppälä
parent
6ef840f3cf
commit
33ea7335b1
@@ -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[]{});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user