Fixed failing Drop test.
This commit is contained in:
@@ -7,16 +7,11 @@ import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.cassandra.core.cql.generator.AlterKeyspaceCqlGenerator;
|
||||
import org.springframework.cassandra.core.cql.generator.AlterTableCqlGenerator;
|
||||
import org.springframework.cassandra.core.keyspace.AlterKeyspaceSpecification;
|
||||
import org.springframework.cassandra.core.keyspace.AlterTableSpecification;
|
||||
import org.springframework.cassandra.core.keyspace.DefaultOption;
|
||||
import org.springframework.cassandra.core.keyspace.KeyspaceOption;
|
||||
import org.springframework.cassandra.core.keyspace.KeyspaceSpecification;
|
||||
import org.springframework.cassandra.core.keyspace.Option;
|
||||
|
||||
import com.datastax.driver.core.DataType;
|
||||
|
||||
public class AlterKeyspaceCqlGeneratorTests {
|
||||
|
||||
/**
|
||||
@@ -30,7 +25,7 @@ public class AlterKeyspaceCqlGeneratorTests {
|
||||
* Convenient base class that other test classes can use so as not to repeat the generics declarations.
|
||||
*/
|
||||
public static abstract class AlterTableTest extends
|
||||
KeyspaceOperationCqlGeneratorTest<AlterKeyspaceSpecification, AlterKeyspaceCqlGenerator> {
|
||||
KeyspaceOperationCqlGeneratorTest<AlterKeyspaceSpecification, AlterKeyspaceCqlGenerator> {
|
||||
}
|
||||
|
||||
public static class BasicTest extends AlterTableTest {
|
||||
|
||||
@@ -18,7 +18,6 @@ public class CreateKeyspaceCqlGeneratorTests {
|
||||
* Asserts that the preamble is first & correctly formatted in the given CQL string.
|
||||
*/
|
||||
public static void assertPreamble(String keyspaceName, String cql) {
|
||||
System.out.println( "'" + cql + "'" );
|
||||
assertTrue(cql.startsWith("CREATE KEYSPACE " + keyspaceName + " "));
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,7 @@ import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.cassandra.core.cql.generator.DropKeyspaceCqlGenerator;
|
||||
import org.springframework.cassandra.core.cql.generator.DropTableCqlGenerator;
|
||||
import org.springframework.cassandra.core.keyspace.DropKeyspaceSpecification;
|
||||
import org.springframework.cassandra.core.keyspace.DropTableSpecification;
|
||||
|
||||
public class DropKeyspaceCqlGeneratorTests {
|
||||
|
||||
@@ -14,16 +12,8 @@ public class DropKeyspaceCqlGeneratorTests {
|
||||
* Asserts that the preamble is first & correctly formatted in the given CQL string.
|
||||
*/
|
||||
public static void assertStatement(String tableName, String cql) {
|
||||
assertTrue(cql.equals("DROP TABLE " + tableName + ";"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that the given list of columns definitions are contained in the given CQL string properly.
|
||||
*
|
||||
* @param columnSpec IE, "foo text, bar blob"
|
||||
*/
|
||||
public static void assertColumnChanges(String columnSpec, String cql) {
|
||||
assertTrue(cql.contains(""));
|
||||
System.out.println( "'" + cql + "'" );
|
||||
assertTrue(cql.equals("DROP KEYSPACE " + tableName + ";"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user