mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-06 19:43:55 +00:00
Fixed #11. Added support for last function
This commit is contained in:
@@ -422,4 +422,12 @@ public class StrmanTest {
|
||||
assertThat(isUpperCase("Foo"), equalTo(false));
|
||||
assertThat(isUpperCase("foobarfooA"), equalTo(false));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void last_shouldReturnLastNChars() throws Exception {
|
||||
assertThat(last("foo", 3), equalTo("foo"));
|
||||
assertThat(last("foobarfoo", 3), equalTo("foo"));
|
||||
assertThat(last("", 3), equalTo(""));
|
||||
assertThat(last("f", 3), equalTo("f"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user