IN PROGRESS - Split out full options integration test.

This commit is contained in:
David Webb
2013-12-17 11:14:45 -05:00
parent 018b69cb8c
commit 30f348126c
2 changed files with 48 additions and 18 deletions

View File

@@ -6,7 +6,6 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cassandra.test.integration.AbstractEmbeddedCassandraIntegrationTest;
import org.springframework.cassandra.test.unit.core.cql.generator.CreateTableCqlGeneratorTests;
import org.springframework.cassandra.test.unit.core.cql.generator.CreateTableCqlGeneratorTests.BasicTest;
import org.springframework.cassandra.test.unit.core.cql.generator.CreateTableCqlGeneratorTests.CompositePartitionKeyTest;
import org.springframework.cassandra.test.unit.core.cql.generator.CreateTableCqlGeneratorTests.CreateTableTest;
@@ -58,21 +57,4 @@ public class CreateTableCqlGeneratorIntegrationTests {
return new CompositePartitionKeyTest();
}
}
public static class TableOptionsIntegrationTest extends AbstractEmbeddedCassandraIntegrationTest {
@Test
public void test() {
CreateTableCqlGeneratorTests.MultipleOptionsTest optionsTest = new CreateTableCqlGeneratorTests.MultipleOptionsTest();
optionsTest.prepare();
log.info(optionsTest.cql);
session.execute(optionsTest.cql);
assertTable(optionsTest.specification, keyspace, session);
}
}
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2011-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cassandra.test.integration.core.cql.generator;
import static org.springframework.cassandra.test.integration.core.cql.generator.CqlTableSpecificationAssertions.assertTable;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cassandra.test.integration.AbstractEmbeddedCassandraIntegrationTest;
import org.springframework.cassandra.test.unit.core.cql.generator.CreateTableCqlGeneratorTests;
/**
* Test CREATE TABLE for all Options and assert against C* TableMetaData
*
* @author David Webb
*/
public class TableOptionsIntegrationTest extends AbstractEmbeddedCassandraIntegrationTest {
private final static Logger log = LoggerFactory.getLogger(TableOptionsIntegrationTest.class);
@Test
public void test() {
CreateTableCqlGeneratorTests.MultipleOptionsTest optionsTest = new CreateTableCqlGeneratorTests.MultipleOptionsTest();
optionsTest.prepare();
log.info(optionsTest.cql);
session.execute(optionsTest.cql);
assertTable(optionsTest.specification, keyspace, session);
}
}