All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.server.springboot.database.cassandra.CassandraKeyspaceIT.mustache Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package {{ packageName }};

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;

import static org.assertj.core.api.Assertions.assertThat;

@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();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy