@Test(expected = IllegalStateException.class) public void test_apply_alterColumn_doesNotExist() { MTable base = base(); AlterColumn alterColumn = new AlterColumn(); alterColumn.setTableName(base.getName()); alterColumn.setColumnName("DoesNotExist"); alterColumn.setType("integer"); base.apply(alterColumn); }
@Test public void test_apply_alterColumn_type() { MTable base = base(); AlterColumn alterColumn = new AlterColumn(); alterColumn.setTableName(base.getName()); alterColumn.setColumnName("id"); alterColumn.setType("uuid"); base.apply(alterColumn); assertThat(base.getColumn("id").getType()).isEqualTo("uuid"); }