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());
}
Aggregations