Search in sources :

Example 1 with AddAutoIncrementChange

use of liquibase.change.core.AddAutoIncrementChange in project liquibase by liquibase.

the class ChangeFactoryTest method unregister_instance.

@Test
public void unregister_instance() {
    ChangeFactory factory = ChangeFactory.getInstance();
    factory.clear();
    assertEquals(0, factory.getRegistry().size());
    AddAutoIncrementChange change = new AddAutoIncrementChange();
    factory.register(CreateTableChange.class);
    factory.register(change.getClass());
    factory.register(DropTableChange.class);
    assertEquals(3, factory.getRegistry().size());
    factory.unregister(ChangeFactory.getInstance().getChangeMetaData(change).getName());
    assertEquals(2, factory.getRegistry().size());
}
Also used : AddAutoIncrementChange(liquibase.change.core.AddAutoIncrementChange) Test(org.junit.Test)

Aggregations

AddAutoIncrementChange (liquibase.change.core.AddAutoIncrementChange)1 Test (org.junit.Test)1