mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-21 15:26:12 +00:00
@@ -26,7 +26,11 @@
|
||||
|
||||
package strman;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
@@ -825,6 +829,18 @@ public class StrmanTests {
|
||||
Arrays.stream(fixture).forEach(el -> assertThat(String.format("toSnakeCase(%s) should be de_camelize", el), toSnakeCase(el), equalTo("de_camelize")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void snakeCase_shouldConvertAStringToSnakecase() throws Exception {
|
||||
String[] input = {
|
||||
"Foo Bar",
|
||||
"fooBar"
|
||||
};
|
||||
|
||||
Arrays.stream(input).forEach(el ->
|
||||
assertThat(String.format("%s should be foo_bar", el), toSnakeCase(el), is(equalTo("foo_bar"))));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unequal_shouldTestInequalityOfStrings() throws Exception {
|
||||
assertThat(unequal("a", "b"), equalTo(true));
|
||||
@@ -876,19 +892,6 @@ public class StrmanTests {
|
||||
|
||||
}
|
||||
|
||||
@Ignore
|
||||
public void snakeCase_shouldConvertAStringToSnakecase() throws Exception {
|
||||
String[] input = {
|
||||
"Foo Bar",
|
||||
"fooBar",
|
||||
"--FOO-BAR--"
|
||||
};
|
||||
|
||||
Arrays.stream(input).forEach(el ->
|
||||
assertThat(String.format("%s should be foo_bar", el), toSnakeCase(el), is(equalTo("foo_bar"))));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void join_shouldJoinArrayOfStringIntoASingleString() throws Exception {
|
||||
String[] strings = {
|
||||
|
||||
Reference in New Issue
Block a user