Search in sources :

Example 1 with ConcurrentMap

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

the class CoherenceNamedCacheConfigurationTests method shouldInjectSuperTypeConcurrentMap.

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

Example 2 with ConcurrentMap

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

the class CoherenceNamedCacheConfigurationViewTest method shouldInjectSuperTypeConcurrentMap.

@Test
@SuppressWarnings("rawtypes")
void shouldInjectSuperTypeConcurrentMap() {
    SuperTypesBean bean = this.ctx.getBean(SuperTypesBean.class);
    ConcurrentMap map = bean.getConcurrentMap();
    assertThat(map, is(notNullValue()));
}
Also used : ConcurrentMap(com.tangosol.util.ConcurrentMap) Test(org.junit.jupiter.api.Test)

Example 3 with ConcurrentMap

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

the class CoherenceGenericConverterTests method testNamedCacheConversion.

@Test
public void testNamedCacheConversion() {
    final Map map = this.conversionService.convert(this.mockedNamedCache, Map.class);
    assertThat(map).isSameAs(this.mockedNamedCache);
    final NamedCache namedCache = this.conversionService.convert(this.mockedNamedCache, NamedCache.class);
    assertThat(namedCache).isSameAs(this.mockedNamedCache);
    final NamedMap namedMap = this.conversionService.convert(this.mockedNamedCache, NamedMap.class);
    assertThat(namedMap).isSameAs(this.mockedNamedCache);
    final CacheMap cacheMap = this.conversionService.convert(this.mockedNamedCache, CacheMap.class);
    assertThat(cacheMap).isSameAs(this.mockedNamedCache);
    final NamedCollection namedCollection = this.conversionService.convert(this.mockedNamedCache, NamedCollection.class);
    assertThat(namedCollection).isSameAs(this.mockedNamedCache);
    final ObservableMap observableMap = this.conversionService.convert(this.mockedNamedCache, ObservableMap.class);
    assertThat(observableMap).isSameAs(this.mockedNamedCache);
    final ConcurrentMap concurrentMap = this.conversionService.convert(this.mockedNamedCache, ConcurrentMap.class);
    assertThat(concurrentMap).isSameAs(this.mockedNamedCache);
    final QueryMap queryMap = this.conversionService.convert(this.mockedNamedCache, QueryMap.class);
    assertThat(queryMap).isSameAs(this.mockedNamedCache);
    final InvocableMap invocableMap = this.conversionService.convert(this.mockedNamedCache, InvocableMap.class);
    assertThat(invocableMap).isSameAs(this.mockedNamedCache);
    final Releasable releasable = this.conversionService.convert(this.mockedNamedCache, Releasable.class);
    assertThat(releasable).isSameAs(this.mockedNamedCache);
}
Also used : InvocableMap(com.tangosol.util.InvocableMap) QueryMap(com.tangosol.util.QueryMap) NamedMap(com.tangosol.net.NamedMap) NamedCollection(com.tangosol.net.NamedCollection) ConcurrentMap(com.tangosol.util.ConcurrentMap) 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) NamedCache(com.tangosol.net.NamedCache) Test(org.junit.jupiter.api.Test)

Example 4 with ConcurrentMap

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

the class CoherenceNamedCacheConfigurationNamedMapAnnotationTests method shouldInjectSuperTypeConcurrentMap.

@Test
void shouldInjectSuperTypeConcurrentMap() {
    CoherenceNamedCacheConfigurationNamedMapAnnotationTests.SuperTypesBean bean = this.ctx.getBean(CoherenceNamedCacheConfigurationNamedMapAnnotationTests.SuperTypesBean.class);
    ConcurrentMap map = bean.getConcurrentMap();
    assertThat(map, is(notNullValue()));
}
Also used : ConcurrentMap(com.tangosol.util.ConcurrentMap) Test(org.junit.jupiter.api.Test)

Example 5 with ConcurrentMap

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

the class NamedCacheFactoriesNamedMapTest method shouldInjectSuperTypeConcurrentMap.

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

Aggregations

ConcurrentMap (com.tangosol.util.ConcurrentMap)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 InvocableMap (com.tangosol.util.InvocableMap)2 ObservableMap (com.tangosol.util.ObservableMap)2 QueryMap (com.tangosol.util.QueryMap)2 Map (java.util.Map)2 ContinuousQueryCache (com.tangosol.net.cache.ContinuousQueryCache)1