From c3e67ee36ebc1c78b19d1ea0d5726c5ef6770b80 Mon Sep 17 00:00:00 2001 From: john-mcpeek Date: Tue, 17 Dec 2013 09:51:57 -0500 Subject: [PATCH] Fixed failing Drop test. --- .../generator/AlterKeyspaceCqlGeneratorTests.java | 7 +------ .../generator/CreateKeyspaceCqlGeneratorTests.java | 1 - .../generator/DropKeyspaceCqlGeneratorTests.java | 14 ++------------ 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/AlterKeyspaceCqlGeneratorTests.java b/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/AlterKeyspaceCqlGeneratorTests.java index 89f23b121..d1c926e0a 100644 --- a/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/AlterKeyspaceCqlGeneratorTests.java +++ b/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/AlterKeyspaceCqlGeneratorTests.java @@ -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 { + KeyspaceOperationCqlGeneratorTest { } public static class BasicTest extends AlterTableTest { diff --git a/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/CreateKeyspaceCqlGeneratorTests.java b/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/CreateKeyspaceCqlGeneratorTests.java index 5e1d39bdb..4088a3a09 100644 --- a/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/CreateKeyspaceCqlGeneratorTests.java +++ b/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/CreateKeyspaceCqlGeneratorTests.java @@ -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 + " ")); } diff --git a/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/DropKeyspaceCqlGeneratorTests.java b/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/DropKeyspaceCqlGeneratorTests.java index 27e17e448..8b48cca62 100644 --- a/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/DropKeyspaceCqlGeneratorTests.java +++ b/spring-cassandra/src/test/java/org/springframework/cassandra/test/unit/core/cql/generator/DropKeyspaceCqlGeneratorTests.java @@ -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 + ";")); } /**