Fixed #22. Added support for removeSpaces function

This commit is contained in:
Shekhar Gulati
2016-05-21 19:43:55 +05:30
parent 7a56392896
commit 8ee53f4121
2 changed files with 22 additions and 0 deletions
+11
View File
@@ -560,4 +560,15 @@ public class StrmanTest {
Arrays.stream(fixture).forEach(el -> assertThat(removeRight(el, "BAR", false), equalTo("foo")));
}
@Test
public void removeSpaces_shouldRemoveSpacesInTheString() throws Exception {
final String[] fixture = {
"foo bar",
"foo bar ",
" foo bar",
" foo bar "
};
Arrays.stream(fixture).forEach(el -> assertThat(removeSpaces(el), equalTo("foobar")));
}
}