Moving a startsWith test to the right test class
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1089726 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3dc67a2a4a
commit
473359a5cc
|
@ -84,6 +84,19 @@ public class StringUtilsStartsEndsWithTest extends TestCase {
|
|||
assertFalse("startsWithIgnoreCase(FOOBAR, bar)", StringUtils.startsWithIgnoreCase(FOOBAR, bar));
|
||||
}
|
||||
|
||||
public void testStartsWithAny() {
|
||||
assertFalse(StringUtils.startsWithAny(null, (String[])null));
|
||||
assertFalse(StringUtils.startsWithAny(null, "abc"));
|
||||
assertFalse(StringUtils.startsWithAny("abcxyz", (String[])null));
|
||||
assertFalse(StringUtils.startsWithAny("abcxyz"));
|
||||
assertTrue(StringUtils.startsWithAny("abcxyz", "abc"));
|
||||
assertTrue(StringUtils.startsWithAny("abcxyz", null, "xyz", "abc"));
|
||||
assertFalse(StringUtils.startsWithAny("abcxyz", null, "xyz", "abcd"));
|
||||
|
||||
assertTrue("StringUtils.startsWithAny(abcxyz, StringBuilder(xyz), StringBuffer(abc))", StringUtils.startsWithAny("abcxyz", new StringBuilder("xyz"), new StringBuffer("abc")));
|
||||
assertTrue("StringUtils.startsWithAny( StrBuilder(abcxyz), StringBuilder(xyz), StringBuffer(abc))", StringUtils.startsWithAny( new StrBuilder("abcxyz"), new StringBuilder("xyz"), new StringBuffer("abc")));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test StringUtils.endsWith()
|
||||
|
|
|
@ -26,7 +26,6 @@ import java.util.Locale;
|
|||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
/**
|
||||
|
@ -1864,19 +1863,6 @@ public class StringUtilsTest extends TestCase {
|
|||
assertEquals("i am a ", StringUtils.getCommonPrefix("i am a machine", "i am a robot"));
|
||||
}
|
||||
|
||||
public void testStartsWithAny() {
|
||||
assertFalse(StringUtils.startsWithAny(null, (String[])null));
|
||||
assertFalse(StringUtils.startsWithAny(null, "abc"));
|
||||
assertFalse(StringUtils.startsWithAny("abcxyz", (String[])null));
|
||||
assertFalse(StringUtils.startsWithAny("abcxyz"));
|
||||
assertTrue(StringUtils.startsWithAny("abcxyz", "abc"));
|
||||
assertTrue(StringUtils.startsWithAny("abcxyz", null, "xyz", "abc"));
|
||||
assertFalse(StringUtils.startsWithAny("abcxyz", null, "xyz", "abcd"));
|
||||
|
||||
assertTrue("StringUtils.startsWithAny(abcxyz, StringBuilder(xyz), StringBuffer(abc))", StringUtils.startsWithAny("abcxyz", new StringBuilder("xyz"), new StringBuffer("abc")));
|
||||
assertTrue("StringUtils.startsWithAny( StrBuilder(abcxyz), StringBuilder(xyz), StringBuffer(abc))", StringUtils.startsWithAny( new StrBuilder("abcxyz"), new StringBuilder("xyz"), new StringBuffer("abc")));
|
||||
}
|
||||
|
||||
public void testNormalizeSpace() {
|
||||
assertEquals(null, StringUtils.normalizeSpace(null));
|
||||
assertEquals("", StringUtils.normalizeSpace(""));
|
||||
|
|
Loading…
Reference in New Issue