generator.server.springboot.cache.ehcache.test.JavaCacheConfigurationIT.mustache Maven / Gradle / Ivy
package {{packageName}}.wire.cache.infrastructure.secondary;
import static org.assertj.core.api.Assertions.assertThat;
import javax.cache.Cache;
import javax.cache.CacheManager;
import org.ehcache.config.CacheRuntimeConfiguration;
import org.ehcache.config.ResourceType;
import org.ehcache.jsr107.Eh107Configuration;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import {{packageName}}.IntegrationTest;
@IntegrationTest(properties = { "application.cache.ehcache.max-entries=1000", "application.cache.ehcache.time-to-live-seconds=86400" })
class CacheConfigurationIT {
@Autowired
private ApplicationContext applicationContext;
@Autowired
private CacheConfiguration cacheConfiguration;
@Autowired
private CacheManager cm;
@Test
void shouldApplyProperties() {
cacheConfiguration.createCache(cm, "shouldApplyProperties");
Cache