use of liquibase.parser.ChangeLogParserFactory in project liquibase by liquibase.
the class ChangeLogParserFactoryTest method unregister_instance.
@Test
public void unregister_instance() {
ChangeLogParserFactory factory = ChangeLogParserFactory.getInstance();
factory.getParsers().clear();
assertEquals(0, factory.getParsers().size());
ChangeLogParser mockChangeLogParser = new MockChangeLogParser();
factory.register(new XMLChangeLogSAXParser());
factory.register(mockChangeLogParser);
factory.register(new SqlChangeLogParser());
assertEquals(3, factory.getParsers().size());
factory.unregister(mockChangeLogParser);
assertEquals(2, factory.getParsers().size());
}
use of liquibase.parser.ChangeLogParserFactory in project liquibase by liquibase.
the class ChangeLogParserFactoryTest method reset.
@Test
public void reset() {
ChangeLogParserFactory instance1 = ChangeLogParserFactory.getInstance();
ChangeLogParserFactory.reset();
assertFalse(instance1 == ChangeLogParserFactory.getInstance());
}
Aggregations