Last active
August 29, 2015 14:08
-
-
Save vfarcic/8eae93dc419803bbda87 to your computer and use it in GitHub Desktop.
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.technologyconversations.java8exercises.streams; | |
import org.junit.Test; | |
import java.util.List; | |
import static com.technologyconversations.java8exercises.streams.ToUpperCase.*; | |
import static java.util.Arrays.asList; | |
import static org.assertj.core.api.Assertions.assertThat; | |
/* | |
Convert elements of a collection to upper case. | |
*/ | |
public class ToUpperCaseSpec { | |
@Test | |
public void transformShouldConvertCollectionElementsToUpperCase() { | |
List<String> collection = asList("My", "name", "is", "John", "Doe"); | |
List<String> expected = asList("MY", "NAME", "IS", "JOHN", "DOE"); | |
assertThat(transform(collection)).hasSameElementsAs(expected); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment