01: package liquibase.change;
02:
03: import static org.junit.Assert.*;
04: import org.junit.Before;
05: import org.junit.Test;
06:
07: /**
08: * Tests for {@link ChangeFactory}
09: */
10: public class ChangeFactoryTest {
11:
12: private ChangeFactory factory;
13:
14: @Before
15: public void setUp() {
16: factory = ChangeFactory.getInstance();
17: }
18:
19: @Test
20: public void createTable() {
21: Change createTableChange = factory.create("createTable");
22: assertEquals(CreateTableChange.class, createTableChange
23: .getClass());
24: }
25:
26: @Test(expected=RuntimeException.class)
27: public void createInvalidChange() {
28: factory.create("invalidChange");
29: }
30: }
|