first commit for new repo
[sdc/sdc-titan-cassandra.git] / src / test / java / com / thinkaurelius / titan / diskstorage / cassandra / embedded / EmbeddedStoreTest.java
1 package com.thinkaurelius.titan.diskstorage.cassandra.embedded;
2
3 import static org.junit.Assert.assertTrue;
4
5 import com.thinkaurelius.titan.diskstorage.BackendException;
6 import com.thinkaurelius.titan.diskstorage.configuration.Configuration;
7 import com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration;
8 import org.junit.BeforeClass;
9 import org.junit.Test;
10 import org.junit.experimental.categories.Category;
11
12 import com.thinkaurelius.titan.CassandraStorageSetup;
13 import com.thinkaurelius.titan.diskstorage.cassandra.AbstractCassandraStoreTest;
14 import com.thinkaurelius.titan.diskstorage.cassandra.AbstractCassandraStoreManager;
15 import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures;
16 import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests;
17
18 public class EmbeddedStoreTest extends AbstractCassandraStoreTest {
19
20     @BeforeClass
21     public static void startCassandra() {
22         CassandraStorageSetup.startCleanEmbedded();
23     }
24
25     @Override
26     public ModifiableConfiguration getBaseStorageConfiguration() {
27         return CassandraStorageSetup.getEmbeddedConfiguration(getClass().getSimpleName());
28     }
29
30     @Override
31     public AbstractCassandraStoreManager openStorageManager(Configuration c) throws BackendException {
32         return new CassandraEmbeddedStoreManager(c);
33     }
34
35     @Test
36     @Category({ OrderedKeyStoreTests.class })
37     public void testConfiguration() {
38         StoreFeatures features = manager.getFeatures();
39         assertTrue(features.isKeyOrdered());
40         assertTrue(features.hasLocalKeyPartition());
41     }
42 }