Search in sources :

Example 16 with DiffResult

use of liquibase.diff.DiffResult in project liquibase by liquibase.

the class AbstractIntegrationTest method generateChangeLog_noChanges.

@Test
public void generateChangeLog_noChanges() throws Exception {
    if (database == null) {
        return;
    }
    runCompleteChangeLog();
    DiffResult diffResult = DiffGeneratorFactory.getInstance().compare(database, database, new CompareControl());
    DiffToChangeLog changeLogWriter = new DiffToChangeLog(diffResult, new DiffOutputControl(false, false, false, null));
    List<ChangeSet> changeSets = changeLogWriter.generateChangeSets();
    assertEquals(0, changeSets.size());
}
Also used : CompareControl(liquibase.diff.compare.CompareControl) DiffOutputControl(liquibase.diff.output.DiffOutputControl) DiffToChangeLog(liquibase.diff.output.changelog.DiffToChangeLog) DiffResult(liquibase.diff.DiffResult) ChangeSet(liquibase.changelog.ChangeSet) Test(org.junit.Test)

Aggregations

DiffResult (liquibase.diff.DiffResult)16 CompareControl (liquibase.diff.compare.CompareControl)11 Test (org.junit.Test)8 DiffToChangeLog (liquibase.diff.output.changelog.DiffToChangeLog)7 DiffOutputControl (liquibase.diff.output.DiffOutputControl)6 DiffToReport (liquibase.diff.output.report.DiffToReport)6 DatabaseSnapshot (liquibase.snapshot.DatabaseSnapshot)5 SnapshotControl (liquibase.snapshot.SnapshotControl)5 PrintStream (java.io.PrintStream)4 Liquibase (liquibase.Liquibase)3 CommandResult (liquibase.command.CommandResult)3 DatabaseException (liquibase.exception.DatabaseException)3 DatabaseObject (liquibase.structure.DatabaseObject)3 IOException (java.io.IOException)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 CatalogAndSchema (liquibase.CatalogAndSchema)2 AbstractIntegrationTest (liquibase.dbtest.AbstractIntegrationTest)2 UnexpectedLiquibaseException (liquibase.exception.UnexpectedLiquibaseException)2 ValidationFailedException (liquibase.exception.ValidationFailedException)2 EmptyDatabaseSnapshot (liquibase.snapshot.EmptyDatabaseSnapshot)2