mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-19 11:25:58 +00:00
Java 11 migrate remaining p (#1122)
* Moves partial-response to Java 11 * Moves pipeline to Java 11 * Moves poison-pill to Java 11 * Moves priority-queue to Java 11 * Moves private-class-data to Java 11 * Moves producer-consumer to Java 11 * Moves promise to Java 11 * Moves property to Java 11 * Moves prototype to Java 11 * Moves proxy to Java 11 * Corrects checkstyle errors * Fixes build for pipeline pattern
This commit is contained in:
committed by
Ilkka Seppälä
parent
1401accb4f
commit
428efc7d53
@@ -32,7 +32,6 @@ public class AppTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
String[] args = {};
|
||||
App.main(args);
|
||||
App.main(new String[]{});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
package com.iluwatar.pipeline;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Test for {@link Pipeline}
|
||||
*/
|
||||
@@ -34,12 +34,12 @@ public class PipelineTest {
|
||||
|
||||
@Test
|
||||
public void testAddHandlersToPipeline() {
|
||||
Pipeline<String, char[]> filters = new Pipeline<>(new RemoveAlphabetsHandler())
|
||||
var filters = new Pipeline<>(new RemoveAlphabetsHandler())
|
||||
.addHandler(new RemoveDigitsHandler())
|
||||
.addHandler(new ConvertToCharArrayHandler());
|
||||
|
||||
assertArrayEquals(
|
||||
new char[] {'#', '!', '(', '&', '%', '#', '!'},
|
||||
new char[]{'#', '!', '(', '&', '%', '#', '!'},
|
||||
filters.execute("#H!E(L&L0O%THE3R#34E!")
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user