Skip to content

Instantly share code, notes, and snippets.

@jxerome
Last active February 21, 2017 13:44
Show Gist options
  • Select an option

  • Save jxerome/9bdb37fa97e955d0bb698f1759424a57 to your computer and use it in GitHub Desktop.

Select an option

Save jxerome/9bdb37fa97e955d0bb698f1759424a57 to your computer and use it in GitHub Desktop.
package ****
import com.datastax.driver.core.KeyspaceMetadata;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Session;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.inject.Inject;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = CNPReferentielApp.class)
public class CassandraKeyspaceUnitTest extends AbstractCassandraTest {
protected final Logger log = LoggerFactory.getLogger(this.getClass().getCanonicalName());
@Inject
private Session session;
@Test
public void shouldListCassandraUnitKeyspace() throws Exception {
assertThat(session.getCluster().getMetadata().getKeyspace(CASSANDRA_UNIT_KEYSPACE))
.isNotNull();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment