コード例 #1
0
 @Test
 public void testCompareWithEmptyLists() {
   final List<String> working = Collections.emptyList();
   final List<String> base = Collections.emptyList();
   final CollectionNode node = differ.compare(working, base);
   assertThat(node.hasChanges(), is(false));
   assertThat(node.hasChildren(), is(false));
 }
コード例 #2
0
 @Test
 public void testCompareWithRemovedCollection() throws Exception {
   final List<Object> working = null;
   final List<Object> base = Collections.emptyList();
   final CollectionNode node = differ.compare(working, base);
   assertThat(node.getState(), is(Node.State.REMOVED));
 }
コード例 #3
0
 @Test
 public void testCompareWithAddedCollection() throws Exception {
   final List<Object> working = Collections.emptyList();
   final CollectionNode node = differ.compare(working, null);
   assertThat(node.getState(), is(Node.State.ADDED));
 }