Merge branch 'client-cache'

This commit is contained in:
Costin Leau
2011-08-24 21:24:48 +03:00
11 changed files with 383 additions and 49 deletions

View File

@@ -0,0 +1,15 @@
package org.springframework.data.gemfire.client;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("client-cache.xml")
public class ClientCacheTest {
@Test
public void test() {
}
}

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
@@ -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());
}
}