use of org.springframework.data.cassandra.core.cql.ReactiveCqlTemplate in project spring-data-cassandra by spring-projects.
the class ReactiveCassandraTemplateIntegrationTests method setUp.
@BeforeEach
void setUp() {
MappingCassandraConverter converter = new MappingCassandraConverter();
CassandraTemplate cassandraTemplate = new CassandraTemplate(this.session, converter);
DefaultBridgedReactiveSession session = new DefaultBridgedReactiveSession(this.session);
template = new ReactiveCassandraTemplate(new ReactiveCqlTemplate(session), converter);
prepareTemplate(template);
SchemaTestUtils.potentiallyCreateTableFor(User.class, cassandraTemplate);
SchemaTestUtils.potentiallyCreateTableFor(UserToken.class, cassandraTemplate);
SchemaTestUtils.truncate(User.class, cassandraTemplate);
SchemaTestUtils.truncate(UserToken.class, cassandraTemplate);
}
use of org.springframework.data.cassandra.core.cql.ReactiveCqlTemplate in project spring-data-cassandra by spring-projects.
the class ReactiveCassandraBatchTemplateIntegrationTests method setUp.
@BeforeEach
void setUp() {
MappingCassandraConverter converter = new MappingCassandraConverter();
CassandraTemplate cassandraTemplate = new CassandraTemplate(this.session, converter);
DefaultBridgedReactiveSession session = new DefaultBridgedReactiveSession(this.session);
template = new ReactiveCassandraTemplate(new ReactiveCqlTemplate(session), converter);
SchemaTestUtils.potentiallyCreateTableFor(Group.class, cassandraTemplate);
SchemaTestUtils.potentiallyCreateTableFor(FlatGroup.class, cassandraTemplate);
SchemaTestUtils.truncate(Group.class, cassandraTemplate);
SchemaTestUtils.truncate(FlatGroup.class, cassandraTemplate);
//
this.template.insert(walter).then(this.template.insert(mike)).as(//
StepVerifier::create).expectNextCount(//
1).verifyComplete();
}
Aggregations