+ more integration tests
This commit is contained in:
Costin Leau
2011-08-24 21:23:04 +03:00
parent 6944092255
commit a05543b447
4 changed files with 33 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ import org.springframework.data.gemfire.CacheFactoryBean;
import org.springframework.data.gemfire.GemfireBeanFactoryLocator;
import org.springframework.data.gemfire.RecreatingContextTest;
import org.springframework.data.gemfire.TestUtils;
import org.springframework.data.gemfire.client.ClientCacheFactoryBean;
/**
* @author Costin Leau
@@ -59,7 +60,7 @@ public class CacheNamespaceTest extends RecreatingContextTest {
assertTrue(ctx.containsBean("cache-with-xml"));
CacheFactoryBean cfb = (CacheFactoryBean) ctx.getBean("&cache-with-xml");
Resource res = TestUtils.readField("cacheXml", cfb);
assertEquals("cache.xml", res.getFilename());
assertEquals("gemfire-cache.xml", res.getFilename());
assertEquals(ctx.getBean("props"), TestUtils.readField("properties", cfb));
}
@@ -76,4 +77,19 @@ public class CacheNamespaceTest extends RecreatingContextTest {
}
}
@Test
public void testBasicClientCache() throws Exception {
assertTrue(ctx.containsBean("client-cache"));
ClientCacheFactoryBean cfb = (ClientCacheFactoryBean) ctx.getBean("&client-cache");
assertNull(TestUtils.readField("cacheXml", cfb));
assertNull(TestUtils.readField("properties", cfb));
}
@Test
public void testBasicClientCacheWithXml() throws Exception {
assertTrue(ctx.containsBean("client-cache-with-xml"));
ClientCacheFactoryBean cfb = (ClientCacheFactoryBean) ctx.getBean("&client-cache-with-xml");
Resource res = TestUtils.readField("cacheXml", cfb);
assertEquals("gemfire-client-cache.xml", res.getFilename());
}
}