org.cassandraunit.BaseCassandraUnit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cassandra-unit Show documentation
Show all versions of cassandra-unit Show documentation
Test framework to develop with Cassandra
package org.cassandraunit;
import org.cassandraunit.utils.EmbeddedCassandraServerHelper;
import org.junit.rules.ExternalResource;
/**
* @author Marcin Szymaniuk
*/
public abstract class BaseCassandraUnit extends ExternalResource {
protected String configurationFileName;
@Override
protected void before() throws Exception {
/* start an embedded Cassandra */
if (configurationFileName != null) {
EmbeddedCassandraServerHelper.startEmbeddedCassandra(configurationFileName);
} else {
EmbeddedCassandraServerHelper.startEmbeddedCassandra();
}
/* create structure and load data */
load();
}
protected abstract void load();
}