use of liquibase.changelog.ChangeSet in project liquibase by liquibase.
the class ContextChangeSetFilterTest method nullContexts.
@Test
public void nullContexts() {
ContextChangeSetFilter filter = new ContextChangeSetFilter();
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test1", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test2", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test1, test2", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, null, null, null)).isAccepted());
}
use of liquibase.changelog.ChangeSet in project liquibase by liquibase.
the class ContextChangeSetFilterTest method reallyNullContexts.
@Test
public void reallyNullContexts() {
ContextChangeSetFilter filter = new ContextChangeSetFilter(null);
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test1", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test1, test2", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, null, null, null)).isAccepted());
}
use of liquibase.changelog.ChangeSet in project liquibase by liquibase.
the class ContextChangeSetFilterTest method multiContextsSingeParameter.
@Test
public void multiContextsSingeParameter() {
ContextChangeSetFilter filter = new ContextChangeSetFilter(new Contexts("test1, test2"));
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test1", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test2", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test1, test2", null, null)).isAccepted());
assertFalse(filter.accepts(new ChangeSet(null, null, false, false, null, "test3", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test3, test1", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test3, TEST1", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, null, null, null)).isAccepted());
}
use of liquibase.changelog.ChangeSet in project liquibase by liquibase.
the class ContextChangeSetFilterTest method visitorContextFilterUpperUpper.
@Test
public void visitorContextFilterUpperUpper() {
ContextChangeSetFilter filter = new ContextChangeSetFilter(new Contexts("TEST1"));
ChangeSet changeSet = new ChangeSet(null, null, false, false, null, null, null, null);
changeSet.addSqlVisitor(new TestSqlVisitor("TEST1"));
assertTrue(filter.accepts(changeSet).isAccepted());
assertEquals(1, changeSet.getSqlVisitors().size());
}
use of liquibase.changelog.ChangeSet in project liquibase by liquibase.
the class ContextChangeSetFilterTest method emptyContexts.
@Test
public void emptyContexts() {
ContextChangeSetFilter filter = new ContextChangeSetFilter();
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test1", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test2", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, "test1, test2", null, null)).isAccepted());
assertTrue(filter.accepts(new ChangeSet(null, null, false, false, null, null, null, null)).isAccepted());
}
Aggregations