mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-17 13:00:08 +00:00
Added support for ensureRight
This commit is contained in:
@@ -306,6 +306,6 @@ public class StrmanTest {
|
||||
@Test
|
||||
public void ensureRight_shouldEnsureStringEndsWithBar() throws Exception {
|
||||
assertThat(Stream.of("foo", "foobar", "fooBAR").map(el -> ensureRight(el, "bar", false)).collect(toList()), hasItems("foobar", "foobar", "fooBAR"));
|
||||
assertThat(Stream.of("foo", "foobar", "fooBAR").map(el -> ensureRight(el, "bar", true)).collect(toList()), hasItems("foobar", "foobar", "fooBARbar"));
|
||||
assertThat(Stream.of("foo", "foobar", "fooBAR").map(el -> ensureRight(el, "bar")).collect(toList()), hasItems("foobar", "foobar", "fooBARbar"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user