mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-20 14:34:04 +00:00
Added support for chars function
This commit is contained in:
@@ -6,7 +6,6 @@ import java.util.Optional;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.collection.IsArrayContainingInOrder.arrayContaining;
|
||||
import static org.hamcrest.collection.IsArrayWithSize.emptyArray;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static strman.Strman.*;
|
||||
|
||||
@@ -58,4 +57,10 @@ public class StrmanTest {
|
||||
assertThat(between("[abc][def]", "{", "}"), arrayContaining("[abc][def]"));
|
||||
assertThat(between("", "{", "}"), arrayContaining(""));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void charsShouldReturnAllCharactersInString() throws Exception {
|
||||
final String title = "title";
|
||||
assertThat(chars(title), equalTo(new String[]{"t", "i", "t", "l", "e"}));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user