commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djo...@apache.org
Subject svn commit: r1561225 - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/builder/ test/java/org/apache/commons/lang3/builder/
Date Fri, 24 Jan 2014 23:17:30 GMT
Author: djones
Date: Fri Jan 24 23:17:29 2014
New Revision: 1561225

URL: http://svn.apache.org/r1561225
Log:
Renamed DiffList to DiffResult as per discussion in LANG-637.

Added:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffResult.java
      - copied, changed from r1561223, commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffList.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffResultTest.java
      - copied, changed from r1561223, commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffListTest.java
Removed:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffList.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffListTest.java
Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diff.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diffable.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffBuilderTest.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diff.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diff.java?rev=1561225&r1=1561224&r2=1561225&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diff.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diff.java Fri
Jan 24 23:17:29 2014
@@ -30,7 +30,7 @@ import org.apache.commons.lang3.tuple.Pa
  * 
  * <p>
  * Typically, {@code Diff}s are retrieved by using a {@link DiffBuilder} to
- * produce a {@link DiffList}, containing the differences between two objects.
+ * produce a {@link DiffResult}, containing the differences between two objects.
  * </p>
  * 
  * 

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java?rev=1561225&r1=1561224&r2=1561225&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
Fri Jan 24 23:17:29 2014
@@ -39,7 +39,7 @@ import org.apache.commons.lang3.ArrayUti
  *   
  *   ...
  *   
- *   public DiffList diff(Person obj) {
+ *   public DiffResult diff(Person obj) {
  *     // No need for null check, as NullPointerException correct if obj is null
  *     return new DiffBuilder(this, obj, ToStringStyle.SHORT_PREFIX_STYLE)
  *       .append("name", this.name, obj.name)
@@ -52,19 +52,19 @@ import org.apache.commons.lang3.ArrayUti
  * 
  * <p>
  * The {@code ToStringStyle} passed to the constructor is embedded in the
- * returned {@code DiffList} and influences the style of the
- * {@code DiffList.toString()} method. This style choice can be overridden by
- * calling {@link DiffList#toString(ToStringStyle)}.
+ * returned {@code DiffResult} and influences the style of the
+ * {@code DiffResult.toString()} method. This style choice can be overridden by
+ * calling {@link DiffResult#toString(ToStringStyle)}.
  * </p>
  * 
  * @since 3.3
  * @version $Id$
  * @see Diffable
  * @see Diff
- * @see DiffList
+ * @see DiffResult
  * @see ToStringStyle
  */
-public class DiffBuilder implements Builder<DiffList> {
+public class DiffBuilder implements Builder<DiffResult> {
 
     private final List<Diff<?>> diffs;
     private final boolean objectsTriviallyEqual;
@@ -80,7 +80,7 @@ public class DiffBuilder implements Buil
      * <p>
      * If {@code lhs == rhs} or {@code lhs.equals(rhs)} then the builder will
      * not evaluate any calls to {@code append(...)} and will return an empty
-     * {@link DiffList} when {@link #build()} is executed.
+     * {@link DiffResult} when {@link #build()} is executed.
      * </p>
      * 
      * @param lhs
@@ -899,16 +899,16 @@ public class DiffBuilder implements Buil
 
     /**
      * <p>
-     * Builds a {@link DiffList} based on the differences appended to this
+     * Builds a {@link DiffResult} based on the differences appended to this
      * builder.
      * </p>
      * 
-     * @return a {@code DiffList} containing the differences between the two
+     * @return a {@code DiffResult} containing the differences between the two
      *         objects.
      */
     @Override
-    public DiffList build() {
-        return new DiffList(lhs, rhs, diffs, style);
+    public DiffResult build() {
+        return new DiffResult(lhs, rhs, diffs, style);
     }
 
 }

Copied: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffResult.java
(from r1561223, commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffList.java)
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffResult.java?p2=commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffResult.java&p1=commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffList.java&r1=1561223&r2=1561225&rev=1561225&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffList.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/DiffResult.java
Fri Jan 24 23:17:29 2014
@@ -22,19 +22,19 @@ import java.util.List;
 
 /**
  * <p>
- * A {@code DiffList} contains a list of the differences between two
+ * A {@code DiffResult} contains a collection of the differences between two
  * {@link Diffable} objects. Typically these differences are displayed using
  * {@link #toString()} method, which returns a string describing the fields that
  * differ between the objects.
  * </p>
  * <p>
- * Use a {@link DiffBuilder} to build a {@code DiffList} comparing two objects.
+ * Use a {@link DiffBuilder} to build a {@code DiffResult} comparing two objects.
  * </p>
  * 
  * @since 3.3
  * @version $Id$
  */
-public class DiffList implements Iterable<Diff<?>> {
+public class DiffResult implements Iterable<Diff<?>> {
 
     /**
      * <p>
@@ -53,7 +53,7 @@ public class DiffList implements Iterabl
 
     /**
      * <p>
-     * Creates a {@link DiffList} containing the differences between two
+     * Creates a {@link DiffResult} containing the differences between two
      * objects.
      * </p>
      * 
@@ -70,7 +70,7 @@ public class DiffList implements Iterabl
      * @throws IllegalArgumentException
      *             if {@code lhs}, {@code rhs} or {@code diffs} is {@code null}
      */
-    DiffList(final Object lhs, final Object rhs, final List<Diff<?>> diffs,
+    DiffResult(final Object lhs, final Object rhs, final List<Diff<?>> diffs,
             final ToStringStyle style) {
         if (lhs == null) {
             throw new IllegalArgumentException(
@@ -133,7 +133,7 @@ public class DiffList implements Iterabl
     /**
      * <p>
      * Builds a {@code String} description of the differences contained within
-     * this {@code DiffList}. A {@link ToStringBuilder} is used for each object
+     * this {@code DiffResult}. A {@link ToStringBuilder} is used for each object
      * and the style of the output is governed by the {@code ToStringStyle}
      * passed to the constructor.
      * </p>
@@ -169,7 +169,7 @@ public class DiffList implements Iterabl
     /**
      * <p>
      * Builds a {@code String} description of the differences contained within
-     * this {@code DiffList}, using the supplied {@code ToStringStyle}.
+     * this {@code DiffResult}, using the supplied {@code ToStringStyle}.
      * </p>
      * 
      * @param style

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diffable.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diffable.java?rev=1561225&r1=1561224&r2=1561225&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diffable.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/Diffable.java
Fri Jan 24 23:17:29 2014
@@ -18,8 +18,8 @@ package org.apache.commons.lang3.builder
 
 /**
  * <p>{@code Diffable} classes can be compared with other objects
- * for differences. The {@link DiffList} object retrieved can be queried
- * for a list of differences or printed using the {@link DiffList#toString()}.</p>
+ * for differences. The {@link DiffResult} object retrieved can be queried
+ * for a list of differences or printed using the {@link DiffResult#toString()}.</p>
  * 
  * <p>The calculation of the differences is <i>consistent with equals</i>
if
  * and only if {@code d1.equals(d2)} implies {@code d1.diff(d2) == ""}.
@@ -50,5 +50,5 @@ public interface Diffable<T> {
      * @return a list of differences
      * @throws NullPointerException if the specified object is {@code null}
      */
-    DiffList diff(T obj);
+    DiffResult diff(T obj);
 }

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffBuilderTest.java?rev=1561225&r1=1561224&r2=1561225&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffBuilderTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffBuilderTest.java
Fri Jan 24 23:17:29 2014
@@ -54,7 +54,7 @@ public class DiffBuilderTest {
         private Object[] objectArrayField = {null};
 
         @Override
-        public DiffList diff(TypeTestClass obj) {
+        public DiffResult diff(TypeTestClass obj) {
             return new DiffBuilder(this, obj, style)
                 .append("boolean", booleanField, obj.booleanField)
                 .append("booleanArray", booleanArrayField, obj.booleanArrayField)
@@ -94,7 +94,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.booleanField = false;
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertEquals(Boolean.class, diff.getType());
@@ -107,7 +107,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.booleanArrayField = new boolean[] {false, false};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertArrayEquals(ArrayUtils.toObject(class1.booleanArrayField), 
@@ -122,7 +122,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.byteField = 0x01;
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertEquals(Byte.valueOf(class1.byteField), diff.getLeft());
@@ -134,7 +134,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.byteArrayField= new byte[] {0x01, 0x02};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertArrayEquals(ArrayUtils.toObject(class1.byteArrayField), 
@@ -148,7 +148,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.charField = 'z';
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertEquals(Character.valueOf(class1.charField), diff.getLeft());
@@ -161,7 +161,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.charArrayField = new char[] {'f', 'o', 'o'};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertArrayEquals(ArrayUtils.toObject(class1.charArrayField), 
@@ -176,7 +176,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.doubleField = 99.99;
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertEquals(Double.valueOf(class1.doubleField), diff.getLeft());
@@ -189,7 +189,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.doubleArrayField = new double[] {3.0, 2.9, 2.8};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertArrayEquals(ArrayUtils.toObject(class1.doubleArrayField), 
@@ -203,7 +203,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.floatField = 99.99F;
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertEquals(Float.valueOf(class1.floatField), diff.getLeft());
@@ -216,7 +216,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.floatArrayField = new float[] {3.0F, 2.9F, 2.8F};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertArrayEquals(ArrayUtils.toObject(class1.floatArrayField), 
@@ -231,7 +231,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.intField = 42;
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertEquals(Integer.valueOf(class1.intField), diff.getLeft());
@@ -244,7 +244,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.intArrayField = new int[] {3, 2, 1};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertArrayEquals(ArrayUtils.toObject(class1.intArrayField), 
@@ -258,7 +258,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.longField = 42L;
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertEquals(Long.valueOf(class1.longField), diff.getLeft());
@@ -271,7 +271,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.longArrayField = new long[] {3L, 2L, 1L};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertArrayEquals(ArrayUtils.toObject(class1.longArrayField), 
@@ -285,7 +285,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.shortField = 42;
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertEquals(Short.valueOf(class1.shortField), diff.getLeft());
@@ -298,7 +298,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.shortArrayField = new short[] {3, 2, 1};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertArrayEquals(ArrayUtils.toObject(class1.shortArrayField), 
@@ -312,7 +312,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.objectField = "Some string";
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertEquals(class1.objectField, diff.getLeft());
@@ -325,7 +325,7 @@ public class DiffBuilderTest {
         TypeTestClass class2 = new TypeTestClass();
         class1.objectField = "Some string";
         class2.objectField = "Some string";
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(0, list.getNumberOfDiffs());
     }
     
@@ -335,7 +335,7 @@ public class DiffBuilderTest {
         TypeTestClass class1 = new TypeTestClass();
         TypeTestClass class2 = new TypeTestClass();
         class2.objectArrayField = new Object[] {"string", 1, 2};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(1, list.getNumberOfDiffs());
         Diff<?> diff = list.getDiffs().get(0);
         assertArrayEquals(class1.objectArrayField, (Object[]) diff.getLeft());
@@ -348,14 +348,14 @@ public class DiffBuilderTest {
         TypeTestClass class2 = new TypeTestClass();
         class1.objectArrayField = new Object[] {"string", 1, 2};
         class2.objectArrayField = new Object[] {"string", 1, 2};
-        DiffList list = class1.diff(class2);
+        DiffResult list = class1.diff(class2);
         assertEquals(0, list.getNumberOfDiffs());
     }  
     
     
     @Test
     public void testByteArrayEqualAsObject() throws Exception {
-        DiffList list = new DiffBuilder("String1", "String2", SHORT_STYLE)
+        DiffResult list = new DiffBuilder("String1", "String2", SHORT_STYLE)
             .append("foo", (Object) new boolean[] {false}, (Object) new boolean[] {false})
             .append("foo", (Object) new byte[] {0x01}, (Object) new byte[] {0x01})
             .append("foo", (Object) new char[] {'a'}, (Object) new char[] {'a'})
@@ -385,7 +385,7 @@ public class DiffBuilderTest {
     @Test
     public void testSameObjectIgnoresAppends() {
         TypeTestClass testClass = new TypeTestClass();        
-        DiffList list = new DiffBuilder(testClass, testClass, SHORT_STYLE)
+        DiffResult list = new DiffBuilder(testClass, testClass, SHORT_STYLE)
             .append("ignored", false, true)
             .build();
         assertEquals(0, list.getNumberOfDiffs());
@@ -395,7 +395,7 @@ public class DiffBuilderTest {
     public void testSimilarObjectIgnoresAppends() {
         TypeTestClass testClass1 = new TypeTestClass();
         TypeTestClass testClass2 = new TypeTestClass();
-        DiffList list = new DiffBuilder(testClass1, testClass2, SHORT_STYLE)
+        DiffResult list = new DiffBuilder(testClass1, testClass2, SHORT_STYLE)
             .append("ignored", false, true)
             .build();
         assertEquals(0, list.getNumberOfDiffs());
@@ -403,9 +403,9 @@ public class DiffBuilderTest {
     
     
     @Test
-    public void testStylePassedToDiffList() {
+    public void testStylePassedToDiffResult() {
         TypeTestClass class1 = new TypeTestClass();
-        DiffList list = class1.diff(class1);
+        DiffResult list = class1.diff(class1);
         assertEquals(SHORT_STYLE, list.getToStringStyle());
         
         class1.style = ToStringStyle.MULTI_LINE_STYLE;

Copied: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffResultTest.java
(from r1561223, commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffListTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffResultTest.java?p2=commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffResultTest.java&p1=commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffListTest.java&r1=1561223&r2=1561225&rev=1561225&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffListTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/DiffResultTest.java
Fri Jan 24 23:17:29 2014
@@ -25,11 +25,11 @@ import java.util.List;
 import org.junit.Test;
 
 /**
- * Unit tests {@link DiffList}.
+ * Unit tests {@link DiffResult}.
  *
  * @version $Id$
  */
-public class DiffListTest {
+public class DiffResultTest {
 
     private static final SimpleClass SIMPLE_FALSE = new SimpleClass(false);
     private static final SimpleClass SIMPLE_TRUE = new SimpleClass(true);
@@ -47,7 +47,7 @@ public class DiffListTest {
         }
 
         @Override
-        public DiffList diff(SimpleClass obj) {
+        public DiffResult diff(SimpleClass obj) {
             return new DiffBuilder(this, obj, ToStringStyle.SHORT_PREFIX_STYLE)
                     .append(getFieldName(), booleanField, obj.booleanField)
                     .build();
@@ -64,7 +64,7 @@ public class DiffListTest {
 
         List<Diff<?>> diffs = lhs.diff(rhs).getDiffs();
 
-        DiffList list = new DiffList(lhs, rhs, diffs, SHORT_STYLE);
+        DiffResult list = new DiffResult(lhs, rhs, diffs, SHORT_STYLE);
         assertEquals(diffs, list.getDiffs());
         assertEquals(1, list.getNumberOfDiffs());
         list.getDiffs().remove(0);
@@ -78,7 +78,7 @@ public class DiffListTest {
         List<Diff<?>> diffs = lhs.diff(rhs).getDiffs();
         Iterator<Diff<?>> expectedIterator = diffs.iterator();
 
-        DiffList list = new DiffList(lhs, rhs, diffs, SHORT_STYLE);
+        DiffResult list = new DiffResult(lhs, rhs, diffs, SHORT_STYLE);
         Iterator<Diff<?>> iterator = list.iterator();
 
         while (iterator.hasNext()) {
@@ -89,17 +89,17 @@ public class DiffListTest {
 
     @Test
     public void testToStringOutput() {
-        DiffList list = new DiffBuilder(new EmptyClass(), new EmptyClass(),
+        DiffResult list = new DiffBuilder(new EmptyClass(), new EmptyClass(),
                 ToStringStyle.SHORT_PREFIX_STYLE).append("test", false, true)
                 .build();
         assertEquals(
-                "DiffListTest.EmptyClass[test=false] differs from DiffListTest.EmptyClass[test=true]",
+                "DiffResultTest.EmptyClass[test=false] differs from DiffResultTest.EmptyClass[test=true]",
                 list.toString());
     }
 
     @Test
     public void testToStringSpecifyStyleOutput() {
-        DiffList list = SIMPLE_FALSE.diff(SIMPLE_TRUE);
+        DiffResult list = SIMPLE_FALSE.diff(SIMPLE_TRUE);
         assertTrue(list.getToStringStyle().equals(SHORT_STYLE));
 
         String lhsString = new ToStringBuilder(SIMPLE_FALSE,
@@ -118,32 +118,32 @@ public class DiffListTest {
 
     @Test(expected = IllegalArgumentException.class)
     public void testNullLhs() {
-        new DiffList(null, SIMPLE_FALSE, SIMPLE_TRUE.diff(SIMPLE_FALSE)
+        new DiffResult(null, SIMPLE_FALSE, SIMPLE_TRUE.diff(SIMPLE_FALSE)
                 .getDiffs(), SHORT_STYLE);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testNullRhs() {
-        new DiffList(SIMPLE_TRUE, null, SIMPLE_TRUE.diff(SIMPLE_FALSE)
+        new DiffResult(SIMPLE_TRUE, null, SIMPLE_TRUE.diff(SIMPLE_FALSE)
                 .getDiffs(), SHORT_STYLE);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testNullList() {
-        new DiffList(SIMPLE_TRUE, SIMPLE_FALSE, null, SHORT_STYLE);
+        new DiffResult(SIMPLE_TRUE, SIMPLE_FALSE, null, SHORT_STYLE);
     }
 
     @Test
     public void testNullStyle() {
-        DiffList diffList = new DiffList(SIMPLE_TRUE, SIMPLE_FALSE, SIMPLE_TRUE
+        DiffResult diffResult = new DiffResult(SIMPLE_TRUE, SIMPLE_FALSE, SIMPLE_TRUE
                 .diff(SIMPLE_FALSE).getDiffs(), null);
-        assertEquals(ToStringStyle.DEFAULT_STYLE, diffList.getToStringStyle());
+        assertEquals(ToStringStyle.DEFAULT_STYLE, diffResult.getToStringStyle());
     }
 
     @Test
     public void testNoDifferencesString() {
-        DiffList diffList = new DiffBuilder(SIMPLE_TRUE, SIMPLE_TRUE,
+        DiffResult diffResult = new DiffBuilder(SIMPLE_TRUE, SIMPLE_TRUE,
                 SHORT_STYLE).build();
-        assertEquals(DiffList.OBJECTS_SAME_STRING, diffList.toString());
+        assertEquals(DiffResult.OBJECTS_SAME_STRING, diffResult.toString());
     }
 }



Mime
View raw message