Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 94070 invoked from network); 7 Apr 2011 04:04:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Apr 2011 04:04:52 -0000 Received: (qmail 13438 invoked by uid 500); 7 Apr 2011 04:04:52 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 13282 invoked by uid 500); 7 Apr 2011 04:04:51 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 13271 invoked by uid 99); 7 Apr 2011 04:04:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 04:04:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 04:04:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id F2CF723889C5; Thu, 7 Apr 2011 04:04:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1089725 - in /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3: StringUtilsStartsEndsWithTest.java StringUtilsTest.java Date: Thu, 07 Apr 2011 04:04:26 -0000 To: commits@commons.apache.org From: bayard@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110407040426.F2CF723889C5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bayard Date: Thu Apr 7 04:04:26 2011 New Revision: 1089725 URL: http://svn.apache.org/viewvc?rev=1089725&view=rev Log: Added CharSequence endsWithAny and startsWithAny tests 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=1089725&r1=1089724&r2=1089725&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:04:26 2011 @@ -17,6 +17,7 @@ package org.apache.commons.lang3; import junit.framework.TestCase; +import org.apache.commons.lang3.text.StrBuilder; /** * Unit tests {@link org.apache.commons.lang3.StringUtils} - StartsWith/EndsWith methods @@ -144,6 +145,8 @@ public class StringUtilsStartsEndsWithTe assertTrue("StringUtils.endsWithAny(abcxyz, new String[] {null, xyz, abc})", StringUtils.endsWithAny("abcxyz", new String[] {null, "xyz", "abc"})); assertFalse("StringUtils.endsWithAny(defg, new String[] {null, xyz, abc})", StringUtils.endsWithAny("defg", new String[] {null, "xyz", "abc"})); + assertTrue("StringUtils.endsWithAny(abcxyz, StringBuilder(abc), StringBuffer(xyz))", StringUtils.endsWithAny("abcxyz", new StringBuilder("abc"), new StringBuffer("xyz"))); + assertTrue("StringUtils.endsWithAny( StrBuilder(abcxyz), StringBuilder(abc), StringBuffer(xyz))", StringUtils.endsWithAny( new StrBuilder("abcxyz"), new StringBuilder("abc"), new StringBuffer("xyz"))); } 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=1089725&r1=1089724&r2=1089725&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:04:26 2011 @@ -26,6 +26,7 @@ import java.util.Locale; import junit.framework.TestCase; +import org.apache.commons.lang3.text.StrBuilder; import org.apache.commons.lang3.text.WordUtils; /** @@ -1871,6 +1872,9 @@ public class StringUtilsTest extends Tes 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() {