BAEL-939 Improve split to string article (#1875)

This commit is contained in:
Raúl Juárez 2017-05-18 14:09:41 -05:00 committed by Grzegorz Piwowarek
parent ec7ee8bc42
commit fdfbab9365
1 changed files with 2 additions and 3 deletions

View File

@ -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");