commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1089726 - in /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3: StringUtilsStartsEndsWithTest.java StringUtilsTest.java
Date Thu, 07 Apr 2011 04:05:57 GMT
Author: bayard
Date: Thu Apr  7 04:05:57 2011
New Revision: 1089726

URL: http://svn.apache.org/viewvc?rev=1089726&view=rev
Log:
Moving a startsWith test to the right test class

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsStartsEndsWithTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsStartsEndsWithTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsStartsEndsWithTest.java?rev=1089726&r1=1089725&r2=1089726&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsStartsEndsWithTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsStartsEndsWithTest.java
Thu Apr  7 04:05:57 2011
@@ -84,6 +84,19 @@ public class StringUtilsStartsEndsWithTe
         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()

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java?rev=1089726&r1=1089725&r2=1089726&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
Thu Apr  7 04:05:57 2011
@@ -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 Tes
         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(""));



Mime
View raw message