Search in sources :

Example 6 with ObservableMap

use of com.tangosol.util.ObservableMap in project micronaut-coherence by micronaut-projects.

the class NamedCacheFactoriesViewTest method shouldInjectSuperTypeObservableMap.

@Test
void shouldInjectSuperTypeObservableMap() {
    SuperTypesBean bean = ctx.getBean(SuperTypesBean.class);
    ObservableMap map = bean.getObservableMap();
    assertThat(map, is(notNullValue()));
}
Also used : ObservableMap(com.tangosol.util.ObservableMap) MicronautTest(io.micronaut.test.extensions.junit5.annotation.MicronautTest) Test(org.junit.jupiter.api.Test)

Example 7 with ObservableMap

use of com.tangosol.util.ObservableMap in project coherence-spring by coherence-community.

the class CoherenceNamedCacheConfigurationTests method shouldInjectSuperTypeObservableMap.

@Test
void shouldInjectSuperTypeObservableMap() {
    SuperTypesBean bean = this.ctx.getBean(SuperTypesBean.class);
    ObservableMap map = bean.getObservableMap();
    assertThat(map, is(notNullValue()));
    assertThat(map, is(sameInstance(bean.getNamedCache())));
}
Also used : ObservableMap(com.tangosol.util.ObservableMap) Test(org.junit.jupiter.api.Test)

Example 8 with ObservableMap

use of com.tangosol.util.ObservableMap in project coherence-spring by coherence-community.

the class CoherenceGenericConverterTests method testContinuousQueryCacheConversion.

@Test
public void testContinuousQueryCacheConversion() {
    final Map map = this.conversionService.convert(this.mockedContinuousQueryCache, Map.class);
    assertThat(map).isSameAs(this.mockedContinuousQueryCache);
    final ContinuousQueryCache continuousQueryCache = this.conversionService.convert(this.mockedContinuousQueryCache, ContinuousQueryCache.class);
    assertThat(continuousQueryCache).isSameAs(this.mockedContinuousQueryCache);
    final AbstractKeySetBasedMap abstractKeySetBasedMap = this.conversionService.convert(this.mockedContinuousQueryCache, AbstractKeySetBasedMap.class);
    assertThat(abstractKeySetBasedMap).isSameAs(this.mockedContinuousQueryCache);
    final AbstractKeyBasedMap abstractKeyBasedMap = this.conversionService.convert(this.mockedContinuousQueryCache, AbstractKeyBasedMap.class);
    assertThat(abstractKeyBasedMap).isSameAs(this.mockedContinuousQueryCache);
    final NamedCache namedCache = this.conversionService.convert(this.mockedContinuousQueryCache, NamedCache.class);
    assertThat(namedCache).isSameAs(this.mockedContinuousQueryCache);
    final NamedMap namedMap = this.conversionService.convert(this.mockedContinuousQueryCache, NamedMap.class);
    assertThat(namedMap).isSameAs(this.mockedContinuousQueryCache);
    final CacheMap cacheMap = this.conversionService.convert(this.mockedContinuousQueryCache, CacheMap.class);
    assertThat(cacheMap).isSameAs(this.mockedContinuousQueryCache);
    final NamedCollection namedCollection = this.conversionService.convert(this.mockedContinuousQueryCache, NamedCollection.class);
    assertThat(namedCollection).isSameAs(this.mockedContinuousQueryCache);
    final ObservableMap observableMap = this.conversionService.convert(this.mockedContinuousQueryCache, ObservableMap.class);
    assertThat(observableMap).isSameAs(this.mockedContinuousQueryCache);
    final ConcurrentMap concurrentMap = this.conversionService.convert(this.mockedContinuousQueryCache, ConcurrentMap.class);
    assertThat(concurrentMap).isSameAs(this.mockedContinuousQueryCache);
    final QueryMap queryMap = this.conversionService.convert(this.mockedContinuousQueryCache, QueryMap.class);
    assertThat(queryMap).isSameAs(this.mockedContinuousQueryCache);
    final InvocableMap invocableMap = this.conversionService.convert(this.mockedContinuousQueryCache, InvocableMap.class);
    assertThat(invocableMap).isSameAs(this.mockedContinuousQueryCache);
    final Releasable releasable = this.conversionService.convert(this.mockedContinuousQueryCache, Releasable.class);
    assertThat(releasable).isSameAs(this.mockedContinuousQueryCache);
}
Also used : InvocableMap(com.tangosol.util.InvocableMap) QueryMap(com.tangosol.util.QueryMap) AbstractKeyBasedMap(com.tangosol.util.AbstractKeyBasedMap) ConcurrentMap(com.tangosol.util.ConcurrentMap) NamedCache(com.tangosol.net.NamedCache) AbstractKeySetBasedMap(com.tangosol.util.AbstractKeySetBasedMap) NamedMap(com.tangosol.net.NamedMap) NamedCollection(com.tangosol.net.NamedCollection) ContinuousQueryCache(com.tangosol.net.cache.ContinuousQueryCache) CacheMap(com.tangosol.net.cache.CacheMap) Releasable(com.tangosol.net.Releasable) ObservableMap(com.tangosol.util.ObservableMap) InvocableMap(com.tangosol.util.InvocableMap) CacheMap(com.tangosol.net.cache.CacheMap) AbstractKeySetBasedMap(com.tangosol.util.AbstractKeySetBasedMap) QueryMap(com.tangosol.util.QueryMap) Map(java.util.Map) ObservableMap(com.tangosol.util.ObservableMap) AbstractKeyBasedMap(com.tangosol.util.AbstractKeyBasedMap) ConcurrentMap(com.tangosol.util.ConcurrentMap) NamedMap(com.tangosol.net.NamedMap) Test(org.junit.jupiter.api.Test)

Example 9 with ObservableMap

use of com.tangosol.util.ObservableMap in project micronaut-coherence by micronaut-projects.

the class NamedCacheFactoriesNamedMapTest method shouldInjectSuperTypeObservableMap.

@Test
void shouldInjectSuperTypeObservableMap() {
    SuperTypesBean bean = ctx.getBean(SuperTypesBean.class);
    ObservableMap map = bean.getObservableMap();
    assertThat(map, is(notNullValue()));
    assertThat(map, is(sameInstance(bean.getNamedMap())));
}
Also used : ObservableMap(com.tangosol.util.ObservableMap) Test(org.junit.jupiter.api.Test) MicronautTest(io.micronaut.test.extensions.junit5.annotation.MicronautTest)

Aggregations

ObservableMap (com.tangosol.util.ObservableMap)9 Test (org.junit.jupiter.api.Test)9 MicronautTest (io.micronaut.test.extensions.junit5.annotation.MicronautTest)3 NamedCache (com.tangosol.net.NamedCache)2 NamedCollection (com.tangosol.net.NamedCollection)2 NamedMap (com.tangosol.net.NamedMap)2 Releasable (com.tangosol.net.Releasable)2 CacheMap (com.tangosol.net.cache.CacheMap)2 AbstractKeyBasedMap (com.tangosol.util.AbstractKeyBasedMap)2 AbstractKeySetBasedMap (com.tangosol.util.AbstractKeySetBasedMap)2 ConcurrentMap (com.tangosol.util.ConcurrentMap)2 InvocableMap (com.tangosol.util.InvocableMap)2 QueryMap (com.tangosol.util.QueryMap)2 Map (java.util.Map)2 ContinuousQueryCache (com.tangosol.net.cache.ContinuousQueryCache)1