@Test( groups = "unit", expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "The renamed column name 'add' is not allowed because it is a reserved keyword") public void should_fail_if_renamed_column_is_a_reserved_keyword() throws Exception { alterTable("test").renameColumn("add"); }
@Test( groups = "unit", expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "The new column name 'add' is not allowed because it is a reserved keyword") public void should_fail_if_new_renamed_column_is_a_reserved_keyword() throws Exception { alterTable("test").renameColumn("col").to("add"); }
@Test(groups = "unit") public void should_rename_column() throws Exception { // When SchemaStatement statement = alterTable("test").renameColumn("name").to("description"); // Then assertThat(statement.getQueryString()) .isEqualTo("\n\tALTER TABLE test RENAME name TO description"); }
@Test( groups = "unit", expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "The renamed column name 'add' is not allowed because it is a reserved keyword") public void should_fail_if_renamed_column_is_a_reserved_keyword() throws Exception { alterTable("test").renameColumn("add"); }
@Test( groups = "unit", expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "The new column name 'add' is not allowed because it is a reserved keyword") public void should_fail_if_new_renamed_column_is_a_reserved_keyword() throws Exception { alterTable("test").renameColumn("col").to("add"); }
@Test(groups = "unit") public void should_rename_column() throws Exception { // When SchemaStatement statement = alterTable("test").renameColumn("name").to("description"); // Then assertThat(statement.getQueryString()) .isEqualTo("\n\tALTER TABLE test RENAME name TO description"); }