use of org.infinispan.spring.provider.SpringEmbeddedCacheManager in project spring-boot by spring-projects.
the class CacheAutoConfigurationTests method infinispanCacheWithCachesAndCustomConfig.
@Test
public void infinispanCacheWithCachesAndCustomConfig() {
load(InfinispanCustomConfiguration.class, "spring.cache.type=infinispan", "spring.cache.cacheNames[0]=foo", "spring.cache.cacheNames[1]=bar");
SpringEmbeddedCacheManager cacheManager = validateCacheManager(SpringEmbeddedCacheManager.class);
assertThat(cacheManager.getCacheNames()).containsOnly("foo", "bar");
ConfigurationBuilder defaultConfigurationBuilder = this.context.getBean(ConfigurationBuilder.class);
verify(defaultConfigurationBuilder, times(2)).build();
}
use of org.infinispan.spring.provider.SpringEmbeddedCacheManager in project spring-boot by spring-projects.
the class CacheAutoConfigurationTests method infinispanCacheWithCaches.
@Test
public void infinispanCacheWithCaches() {
load(DefaultCacheConfiguration.class, "spring.cache.type=infinispan", "spring.cache.cacheNames[0]=foo", "spring.cache.cacheNames[1]=bar");
SpringEmbeddedCacheManager cacheManager = validateCacheManager(SpringEmbeddedCacheManager.class);
assertThat(cacheManager.getCacheNames()).containsOnly("foo", "bar");
}
use of org.infinispan.spring.provider.SpringEmbeddedCacheManager in project spring-boot by spring-projects.
the class CacheAutoConfigurationTests method infinispanCacheWithConfig.
@Test
public void infinispanCacheWithConfig() {
load(DefaultCacheConfiguration.class, "spring.cache.type=infinispan", "spring.cache.infinispan.config=infinispan.xml");
SpringEmbeddedCacheManager cacheManager = validateCacheManager(SpringEmbeddedCacheManager.class);
assertThat(cacheManager.getCacheNames()).contains("foo", "bar");
}
Aggregations