Created
November 2, 2014 21:39
-
-
Save vfarcic/095769d4cf9cb1192b89 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.Sum.*; | |
import static java.util.Arrays.asList; | |
import static org.assertj.core.api.Assertions.assertThat; | |
/* | |
Sum all elements of a collection | |
*/ | |
public class SumSpec { | |
@Test | |
public void transformShouldConvertCollectionElementsToUpperCase() { | |
List<Integer> numbers = asList(1, 2, 3, 4, 5); | |
assertThat(calculate(numbers)).isEqualTo(1 + 2 + 3 + 4 + 5); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment