Search in sources :

Example 1 with CollectionMap

use of com.couchbase.client.core.io.CollectionMap in project couchbase-jvm-clients by couchbase.

the class KeyValueMessageHandlerTest method setup.

@BeforeAll
static void setup() {
    ENV = CoreEnvironment.builder().eventBus(new SimpleEventBus(true)).build();
    Core core = mock(Core.class);
    CoreContext coreContext = new CoreContext(core, 1, ENV, PasswordAuthenticator.create("foo", "bar"));
    ConfigurationProvider configurationProvider = mock(ConfigurationProvider.class);
    when(configurationProvider.collectionMap()).thenReturn(new CollectionMap());
    when(core.configurationProvider()).thenReturn(configurationProvider);
    CTX = new EndpointContext(coreContext, new HostAndPort("127.0.0.1", 1234), null, ServiceType.KV, Optional.empty(), Optional.empty(), Optional.empty());
}
Also used : HostAndPort(com.couchbase.client.core.util.HostAndPort) CoreContext(com.couchbase.client.core.CoreContext) CollectionMap(com.couchbase.client.core.io.CollectionMap) EndpointContext(com.couchbase.client.core.endpoint.EndpointContext) ConfigurationProvider(com.couchbase.client.core.config.ConfigurationProvider) SimpleEventBus(com.couchbase.client.core.cnc.SimpleEventBus) Core(com.couchbase.client.core.Core) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

Core (com.couchbase.client.core.Core)1 CoreContext (com.couchbase.client.core.CoreContext)1 SimpleEventBus (com.couchbase.client.core.cnc.SimpleEventBus)1 ConfigurationProvider (com.couchbase.client.core.config.ConfigurationProvider)1 EndpointContext (com.couchbase.client.core.endpoint.EndpointContext)1 CollectionMap (com.couchbase.client.core.io.CollectionMap)1 HostAndPort (com.couchbase.client.core.util.HostAndPort)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1