@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)); }
@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)); }
@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)); }