mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-13 17:13:55 +00:00
Fixed #23. Added support for repeat function
This commit is contained in:
@@ -571,4 +571,13 @@ public class StrmanTest {
|
||||
};
|
||||
Arrays.stream(fixture).forEach(el -> assertThat(removeSpaces(el), equalTo("foobar")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void repeat_shouldRepeatAStringNTimes() throws Exception {
|
||||
assertThat(repeat("1", 1), equalTo("1"));
|
||||
assertThat(repeat("1", 2), equalTo("11"));
|
||||
assertThat(repeat("1", 3), equalTo("111"));
|
||||
assertThat(repeat("1", 4), equalTo("1111"));
|
||||
assertThat(repeat("1", 5), equalTo("11111"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user