01: package liquibase;
02:
03: import liquibase.ChangeSet;
04: import liquibase.change.CreateTableChange;
05: import liquibase.change.InsertDataChange;
06: import static org.junit.Assert.*;
07: import org.junit.Test;
08:
09: /**
10: * Tests for {@link liquibase.ChangeSet}
11: */
12: public class ChangeSetTest {
13:
14: @Test
15: public void getDescriptions() {
16: ChangeSet changeSet = new ChangeSet("testId", "testAuthor",
17: false, false, null, null, null, null);
18:
19: assertEquals("Empty", changeSet.getDescription());
20:
21: changeSet.addChange(new InsertDataChange());
22: assertEquals("Insert Row", changeSet.getDescription());
23:
24: changeSet.addChange(new InsertDataChange());
25: assertEquals("Insert Row (x2)", changeSet.getDescription());
26:
27: changeSet.addChange(new CreateTableChange());
28: assertEquals("Insert Row (x2), Create Table", changeSet
29: .getDescription());
30: }
31: }
|