Created
July 10, 2016 21:06
-
-
Save eddarmitage/a93a56e6b7c509add522b32a62965a5b to your computer and use it in GitHub Desktop.
I expected the following usage of hasOnlyOneElementSatisfying to pass - perhaps the current implementation would be better described as hasOnlyOneElementAndSatisfies?
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
import org.junit.Test; | |
import java.util.Arrays; | |
import java.util.List; | |
import static org.assertj.core.api.Assertions.assertThat; | |
public class HasOnlyOneElementSatisfyingTest { | |
@Test | |
public void whatIExpectedToPass() { | |
List<String> words = Arrays.asList("Woo", "Hoo"); | |
assertThat(words).hasOnlyOneElementSatisfying(w -> assertThat(w).isEqualToIgnoringCase("woo")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment