@@ -61,7 +61,7 @@ public class ObjectDifferITCase
6161 @ BeforeMethod
6262 public void setUp () throws Exception
6363 {
64- objectDiffer = ObjectDifferBuilder .buildDefaultObjectDiffer ();
64+ objectDiffer = ObjectDifferBuilder .buildDefault ();
6565 }
6666
6767 public void testCompareBeanWithIgnoredMapProperty ()
@@ -96,7 +96,7 @@ public void testCompareCollectionWithAddedItem() throws Exception
9696 final Collection <String > working = new LinkedList <String >(asList ("foo" ));
9797 final Collection <String > base = new LinkedList <String >();
9898
99- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
99+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
100100
101101 NodeAssertions .assertThat (node ).self ().hasState (DiffNode .State .CHANGED );
102102 NodeAssertions .assertThat (node ).child (new CollectionItemElement ("foo" )).hasState (DiffNode .State .ADDED );
@@ -107,7 +107,7 @@ public void testCompareCollectionWithRemovedItem() throws Exception
107107 final Collection <String > working = new LinkedList <String >();
108108 final Collection <String > base = new LinkedList <String >(asList ("foo" ));
109109
110- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
110+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
111111
112112 NodeAssertions .assertThat (node ).self ().hasState (DiffNode .State .CHANGED );
113113 NodeAssertions .assertThat (node ).child (new CollectionItemElement ("foo" )).hasState (DiffNode .State .REMOVED );
@@ -119,7 +119,7 @@ public void testThatIgnoredPropertiesAreNeverAccessed()
119119 final ObjectWithAccessTrackingIgnoredProperty working = new ObjectWithAccessTrackingIgnoredProperty ();
120120 final ObjectWithAccessTrackingIgnoredProperty base = new ObjectWithAccessTrackingIgnoredProperty ();
121121
122- ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
122+ ObjectDifferBuilder .buildDefault ().compare (working , base );
123123
124124 Assertions .assertThat (working .accessed ).isFalse ();
125125 Assertions .assertThat (base .accessed ).isFalse ();
@@ -147,7 +147,7 @@ public void testCompareCollectionWithDifferentCollectionImplementationsSucceeds(
147147 final Collection <String > base = new LinkedHashSet <String >(asList ("one" , "two" ));
148148 final Collection <String > working = new TreeSet <String >(asList ("one" , "three" ));
149149
150- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (base , working );
150+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (base , working );
151151
152152 NodeAssertions .assertThat (node ).self ().hasState (DiffNode .State .CHANGED );
153153 }
@@ -158,7 +158,7 @@ public void testCompareCollectionWithChangedItem() throws Exception
158158 final List <?> working = asList (new ObjectWithIdentityAndValue ("foo" , "1" ));
159159 final List <?> base = asList (new ObjectWithIdentityAndValue ("foo" , "2" ));
160160
161- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
161+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
162162
163163 assertThat (node ).self ().hasChanges ();
164164 assertThat (node ).child (new CollectionItemElement (new ObjectWithIdentityAndValue ("foo" )))
@@ -172,7 +172,7 @@ public void testWithNewMapInWorkingAndNoneInBase()
172172 final Map <String , String > working = new TreeMap <String , String >();
173173 working .put ("foo" , "bar" );
174174
175- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
175+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
176176
177177 NodeAssertions .assertThat (node ).self ().hasState (DiffNode .State .ADDED );
178178 NodeAssertions .assertThat (node ).child (new MapKeyElement ("foo" )).hasState (DiffNode .State .ADDED );
@@ -185,7 +185,7 @@ public void testWithAdditionOfSimpleTypeToWorkingMap()
185185 final Map <String , String > working = new TreeMap <String , String >();
186186 working .put ("foo" , "bar" );
187187
188- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
188+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
189189
190190 NodeAssertions .assertThat (node ).self ().hasState (DiffNode .State .CHANGED );
191191 NodeAssertions .assertThat (node ).child (new MapKeyElement ("foo" )).hasState (DiffNode .State .ADDED );
@@ -199,7 +199,7 @@ public void testWithSameEntryInBaseAndWorking()
199199 final Map <String , String > working = new TreeMap <String , String >();
200200 working .put ("foo" , "bar" );
201201
202- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
202+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
203203
204204 NodeAssertions .assertThat (node ).self ().hasState (DiffNode .State .UNTOUCHED );
205205 NodeAssertions .assertThat (node ).self ().hasNoChildren ();
@@ -212,7 +212,7 @@ public void testWithSingleEntryAddedToWorkingMap()
212212 base .put ("foo" , "bar" );
213213 final Map <String , String > working = null ;
214214
215- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
215+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
216216
217217 NodeAssertions .assertThat (node ).self ().hasState (DiffNode .State .REMOVED );
218218 NodeAssertions .assertThat (node ).child (new MapKeyElement ("foo" )).hasState (DiffNode .State .REMOVED );
@@ -231,7 +231,7 @@ public void testWithAllNullMapItem()
231231 final Map <String , String > base = new HashMap <String , String >(1 );
232232 base .put ("foo" , null );
233233
234- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
234+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
235235
236236 NodeAssertions .assertThat (node ).self ().hasState (DiffNode .State .UNTOUCHED );
237237 }
@@ -244,7 +244,7 @@ public void testWithSameEntries()
244244 final Map <String , String > base = new LinkedHashMap <String , String >(modified );
245245 modified .put ("ping" , "pong" );
246246
247- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (modified , base );
247+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (modified , base );
248248
249249 NodeAssertions .assertThat (node ).root ().hasChildren (1 );
250250 NodeAssertions .assertThat (node )
@@ -264,7 +264,7 @@ public void testWithChangedEntry()
264264 final Map <String , String > base = new LinkedHashMap <String , String >(1 );
265265 base .put ("foo" , "woot" );
266266
267- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
267+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
268268 NodeAssertions .assertThat (node ).self ().hasChildren (1 );
269269 NodeAssertions .assertThat (node ).child (new MapKeyElement ("foo" )).hasState (DiffNode .State .CHANGED );
270270 }
@@ -275,23 +275,23 @@ public void testCompareWithDifferentMapImplementationsSucceeds() throws Exceptio
275275 final Map <String , String > base = new LinkedHashMap <String , String >(Collections .singletonMap ("test" , "foo" ));
276276 final Map <String , String > working = new TreeMap <String , String >(Collections .singletonMap ("test" , "bar" ));
277277
278- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
278+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
279279
280280 NodeAssertions .assertThat (node ).self ().hasState (DiffNode .State .CHANGED );
281281 }
282282
283283 @ Test (groups = INTEGRATION )
284284 public void testCompareWithDifferentStrings () throws Exception
285285 {
286- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare ("foo" , "bar" );
286+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare ("foo" , "bar" );
287287
288288 assertThat (node ).self ().hasState (DiffNode .State .CHANGED );
289289 }
290290
291291 @ Test (expectedExceptions = IllegalArgumentException .class , groups = INTEGRATION )
292292 public void testCompareWithDifferentTypes ()
293293 {
294- ObjectDifferBuilder .buildDefaultObjectDiffer ().compare ("foo" , 1337 );
294+ ObjectDifferBuilder .buildDefault ().compare ("foo" , 1337 );
295295 }
296296
297297 @ Test (groups = INTEGRATION )
@@ -315,7 +315,7 @@ public void testCompareWithComplexType()
315315// when(configuration.isReturnable(any(Node.class))).thenReturn(true);
316316// when(node.hasChanges()).thenReturn(true);
317317
318- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (
318+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (
319319 new ObjectWithIdentityAndValue ("a" , "1" ),
320320 new ObjectWithIdentityAndValue ("a" , "2" ));
321321
@@ -327,7 +327,7 @@ public void testCompareWithListContainingObjectTwiceDetectsIfOneGetsRemoved() th
327327 {
328328 final List <ObjectWithHashCodeAndEquals > base = asList (new ObjectWithHashCodeAndEquals ("foo" ), new ObjectWithHashCodeAndEquals ("foo" ));
329329 final List <ObjectWithHashCodeAndEquals > working = asList (new ObjectWithHashCodeAndEquals ("foo" ));
330- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
330+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
331331 node .visit (new NodeHierarchyVisitor ());
332332 assertThat (node )
333333 .child (NodePath .createBuilder ()
@@ -342,7 +342,7 @@ public void testCompareWithListContainingObjectOnceDetectsIfAnotherInstanceOfItG
342342 {
343343 final List <ObjectWithHashCodeAndEquals > base = asList (new ObjectWithHashCodeAndEquals ("foo" ));
344344 final List <ObjectWithHashCodeAndEquals > working = asList (new ObjectWithHashCodeAndEquals ("foo" ), new ObjectWithHashCodeAndEquals ("foo" ));
345- final DiffNode node = ObjectDifferBuilder .buildDefaultObjectDiffer ().compare (working , base );
345+ final DiffNode node = ObjectDifferBuilder .buildDefault ().compare (working , base );
346346 node .visit (new NodeHierarchyVisitor ());
347347 assertThat (node ).child (NodePath .createBuilder ()
348348 .withRoot ()
0 commit comments