fix splitter pattern
This commit is contained in:
parent
2022b7f994
commit
9e2f9b7e29
|
@ -92,7 +92,7 @@ public class GuavaStringUnitTest {
|
||||||
@Test
|
@Test
|
||||||
public void whenSplitStringOnMultipleSeparator_thenSplit() {
|
public void whenSplitStringOnMultipleSeparator_thenSplit() {
|
||||||
final String input = "apple.banana,,orange,,.";
|
final String input = "apple.banana,,orange,,.";
|
||||||
final List<String> result = Splitter.onPattern("[.|,]").omitEmptyStrings().splitToList(input);
|
final List<String> result = Splitter.onPattern("[.,]").omitEmptyStrings().splitToList(input);
|
||||||
|
|
||||||
assertThat(result, contains("apple", "banana", "orange"));
|
assertThat(result, contains("apple", "banana", "orange"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue