BAEL-939 Improve split to string article (#1875)
This commit is contained in:
parent
ec7ee8bc42
commit
fdfbab9365
|
@ -47,10 +47,9 @@ public class SplitUnitTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void givenString_whenSplit_thenReturnsIterable_Splitter() {
|
||||
public void givenString_whenSplit_thenReturnsList_Splitter() {
|
||||
//given
|
||||
Iterable<String> result = Splitter.on(',').trimResults().omitEmptyStrings().split("car,jeep,, scooter");
|
||||
List<String> resultList = Lists.newArrayList(result);
|
||||
List<String> resultList = Splitter.on(',').trimResults().omitEmptyStrings().splitToList("car,jeep,, scooter");
|
||||
|
||||
assertThat(resultList)
|
||||
.containsExactly("car", "jeep", "scooter");
|
||||
|
|
Loading…
Reference in New Issue