Created
October 31, 2015 03:08
-
-
Save niloc132/e6cca356bb243a03b1cc to your computer and use it in GitHub Desktop.
First GWT Stream emulation test is passing...
This file contains hidden or 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
[junit] Running com.google.gwt.emultest.java.util.stream.StreamTest | |
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 27.767 sec | |
BUILD SUCCESSFUL | |
Total time: 30 seconds |
This file contains hidden or 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
package com.google.gwt.emultest.java.util.stream; | |
import com.google.gwt.emultest.java.util.EmulTestBase; | |
import java.lang.Object; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
public class StreamTest extends EmulTestBase { | |
public void testSimpleStream() { | |
List<Object> letters = Stream.of("e", "a", "c", "b", "d", "f") | |
.filter(letter -> !letter.equals("c")) | |
.map(letter -> letter + " ") | |
.sorted() | |
.filter(letter -> !letter.equals("b ")) | |
.collect(Collectors.toList()); | |
assertEquals(new String[]{"a ", "d ", "e ", "f "}, letters); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment