-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
f8b4549
commit e94c695
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package java8; | ||
|
||
import gov.nasa.jpf.util.test.TestJPF; | ||
import java.util.function.Supplier; | ||
import org.junit.Test; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
public class StreamTest { | ||
public static List<String> allToUpperCase(List<String> words) { | ||
return words.stream() | ||
.map(string -> string.toUpperCase()) | ||
.collect(Collectors.toList()); | ||
} | ||
|
||
@Test | ||
public void multipleWordsToUppercase() { | ||
List<String> input = Arrays.asList("a", "b", "hello"); | ||
List<String> result = allToUpperCase(input); | ||
assertEquals(asList("A", "B", "HELLO"), result); | ||
} | ||
private void assertEquals(Object asList, List<String> result) { | ||
} | ||
|
||
|
||
private Object asList(String string, String string2, String string3) { | ||
return null; | ||
} | ||
} |