commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1153343 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
Date Wed, 03 Aug 2011 04:49:45 GMT
Author: bayard
Date: Wed Aug  3 04:49:45 2011
New Revision: 1153343

URL: http://svn.apache.org/viewvc?rev=1153343&view=rev
Log:
Rolling back r1153037 and r1153038 - the changes didn't help

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java?rev=1153343&r1=1153342&r2=1153343&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
Wed Aug  3 04:49:45 2011
@@ -22,8 +22,6 @@ import java.util.List;
 
 import junit.framework.TestCase;
 
-import org.apache.commons.lang3.StringUtils;
-
 /**
  * Unit tests for {@link org.apache.commons.lang3.builder.ToStringBuilder}.
  *
@@ -302,16 +300,8 @@ public class ToStringBuilderTest extends
     public void testReflectionHierarchyArrayList() {
         List<Object> base = new ArrayList<Object>();
         String baseStr = this.toBaseString(base);
-
-        // Lots of contains methods so we're not making assumptions about the order of ArrayList
[LANG-727].
-        String result = ToStringBuilder.reflectionToString(base, null, true);
-        assertTrue( StringUtils.startsWith(result, baseStr + "[") );
-        assertTrue( StringUtils.contains(result, "elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>}"
) );
-        assertTrue( StringUtils.contains(result, "size=0") );
-        assertTrue( StringUtils.contains(result, "modCount=0") );
-        assertTrue( StringUtils.endsWith(result, "]") );
+        assertEquals(baseStr + "[elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>},size=0,modCount=0]",
ToStringBuilder.reflectionToString(base, null, true));
         assertEquals(baseStr + "[size=0]", ToStringBuilder.reflectionToString(base, null,
false));
-
         this.validateNullToStringStyleRegistry();
     }
 



Mime
View raw message