mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-12 00:23:56 +00:00
Fixed #20. Added support for removeNonWords function
This commit is contained in:
@@ -524,4 +524,16 @@ public class StrmanTest {
|
||||
|
||||
Arrays.stream(fixture).forEach(el -> assertThat(removeLeft(el, "FOO", false), equalTo("bar")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void removeNonWords_shouldRemoveAllNonWordsFromInputString() throws Exception {
|
||||
|
||||
final String[] fixture = {
|
||||
"foo bar",
|
||||
"foo&bar-",
|
||||
"foobar"
|
||||
};
|
||||
|
||||
Arrays.stream(fixture).forEach(el -> assertThat(removeNonWords(el), equalTo("foobar")));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user