Esempio n. 1
0
  @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);
  }
Esempio n. 2
0
  @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");
  }