Search in sources :

Example 1 with DriverContext

use of com.datastax.oss.driver.api.core.context.DriverContext in project spring-boot by spring-projects.

the class CassandraMockConfiguration method cqlSession.

@Bean
CqlSession cqlSession() {
    DriverContext context = mock(DriverContext.class);
    given(context.getCodecRegistry()).willReturn(this.codecRegistry);
    CqlSession cqlSession = mock(CqlSession.class);
    given(cqlSession.getContext()).willReturn(context);
    return cqlSession;
}
Also used : DriverContext(com.datastax.oss.driver.api.core.context.DriverContext) CqlSession(com.datastax.oss.driver.api.core.CqlSession) Bean(org.springframework.context.annotation.Bean)

Aggregations

CqlSession (com.datastax.oss.driver.api.core.CqlSession)1 DriverContext (com.datastax.oss.driver.api.core.context.DriverContext)1 Bean (org.springframework.context.annotation.Bean)1