generator.server.springboot.database.cassandra.CassandraKeyspaceIT.mustache Maven / Gradle / Ivy
package {{ packageName }};
import static org.assertj.core.api.Assertions.assertThat;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.metadata.Metadata;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@IntegrationTest
class CassandraKeyspaceIT {
private static final String KEYSPACE = "{{ baseName }}";
@Autowired
private CqlSession session;
@Test
void shouldListCassandraUnitKeyspace() {
Metadata metadata = session.getMetadata();
assertThat(metadata.getKeyspace(KEYSPACE)).isNotEmpty();
}
}