@Test public void should_find_no_differences_between_identical_datasets() throws Exception { final AssertionErrorCollector errorCollector = new AssertionErrorCollector(); DataSetComparator dataSetComparator = new DataSetComparator(new String[] {}, new String[] {}, noCustomFilters()); IDataSet usersXml = DataSetBuilder.builderFor(Format.XML).build("datasets/users.xml"); IDataSet usersYaml = DataSetBuilder.builderFor(Format.JSON).build("datasets/users.json"); dataSetComparator.compare(usersXml, usersYaml, errorCollector); assertThat(errorCollector.amountOfErrors()).isZero(); }
public void compare(IDataSet currentDataSet, IDataSet expectedDataSet, AssertionErrorCollector errorCollector) throws DatabaseUnitException { if (expectedDataSet.getTableNames().length == 0) { shouldBeEmpty(currentDataSet, errorCollector); } else { compareContent(currentDataSet, expectedDataSet, errorCollector); } }
DataSetComparator { public void compare(IDataSet currentDataSet, IDataSet expectedDataSet, AssertionErrorCollector errorCollector) throws DatabaseUnitException { if (expectedDataSet.getTableNames().length == 0) { shouldBeEmpty(currentDataSet, errorCollector); } else { compareContent(currentDataSet, expectedDataSet, errorCollector); } } }
DataSetComparator { public void compare(IDataSet currentDataSet, IDataSet expectedDataSet, AssertionErrorCollector errorCollector) throws DatabaseUnitException { if (expectedDataSet.getTableNames().length == 0) { shouldBeEmpty(currentDataSet, errorCollector); } else { compareContent(currentDataSet, expectedDataSet, errorCollector); } } DataSetComparator(final String[] orderBy, final String[] toExclude,
        Set<Class<? extends IColumnFilter>> columnFilters); }
DataSetComparator { public void compare(IDataSet currentDataSet, IDataSet expectedDataSet, AssertionErrorCollector errorCollector) throws DatabaseUnitException { if (expectedDataSet.getTableNames().length == 0) { shouldBeEmpty(currentDataSet, errorCollector); } else { compareContent(currentDataSet, expectedDataSet, errorCollector); } } DataSetComparator(final String[] orderBy, final String[] toExclude,
        Set<Class<? extends IColumnFilter>> columnFilters); void compare(IDataSet currentDataSet, IDataSet expectedDataSet, AssertionErrorCollector errorCollector); void compareContent(IDataSet currentDataSet, IDataSet expectedDataSet, AssertionErrorCollector errorCollector); void shouldBeEmpty(IDataSet dataSet, AssertionErrorCollector errorCollector); void shouldBeEmpty(IDataSet dataSet, String tableName, AssertionErrorCollector errorCollector); }
DataSetComparator { public void compare(IDataSet currentDataSet, IDataSet expectedDataSet, AssertionErrorCollector errorCollector) throws DatabaseUnitException { if (expectedDataSet.getTableNames().length == 0) { shouldBeEmpty(currentDataSet, errorCollector); } else { compareContent(currentDataSet, expectedDataSet, errorCollector); } } DataSetComparator(final String[] orderBy, final String[] toExclude,
        Set<Class<? extends IColumnFilter>> columnFilters); void compare(IDataSet currentDataSet, IDataSet expectedDataSet, AssertionErrorCollector errorCollector); void compareContent(IDataSet currentDataSet, IDataSet expectedDataSet, AssertionErrorCollector errorCollector); void shouldBeEmpty(IDataSet dataSet, AssertionErrorCollector errorCollector); void shouldBeEmpty(IDataSet dataSet, String tableName, AssertionErrorCollector errorCollector);  }