use of com.datastax.oss.driver.api.core.CqlIdentifier in project spring-boot by spring-projects.
the class CassandraAutoConfigurationTests method cqlSessionBuildHasScopePrototype.
@Test
void cqlSessionBuildHasScopePrototype() {
this.contextRunner.run((context) -> {
CqlIdentifier keyspace = CqlIdentifier.fromCql("test");
CqlSessionBuilder firstBuilder = context.getBean(CqlSessionBuilder.class);
assertThat(firstBuilder.withKeyspace(keyspace)).hasFieldOrPropertyWithValue("keyspace", keyspace);
CqlSessionBuilder secondBuilder = context.getBean(CqlSessionBuilder.class);
assertThat(secondBuilder).hasFieldOrPropertyWithValue("keyspace", null);
});
}
Aggregations