Пример #1
0
  @Test(expected = IllegalStateException.class)
  public void test_apply_dropColumn_doesNotExist() {

    MTable base = base();

    DropColumn dropColumn = new DropColumn();
    dropColumn.setTableName(base.getName());
    dropColumn.setColumnName("DoesNotExist");
    base.apply(dropColumn);
  }
Пример #2
0
  @Test
  public void test_apply_dropColumn() {

    MTable base = base();

    DropColumn dropColumn = new DropColumn();
    dropColumn.setTableName("tab");
    dropColumn.setColumnName("name");

    base.apply(dropColumn);
    assertThat(base.getColumn("name")).isNull();
  }