Package com.gemstone.gemfire.cache

Examples of com.gemstone.gemfire.cache.Cache


  }

  @Test(expected = IllegalArgumentException.class)
  public void testDoInitWithIllegalStartEndPorts() throws Exception {
    try {
      Cache mockCache = mock(Cache.class, "testDoInitWithIllegalStartEndPorts.Cache");
      GatewayReceiverFactory mockGatewayReceiverFactory = mock(GatewayReceiverFactory.class,
        "testDoInitWithIllegalStartEndPorts.GatewayReceiverFactory");

      when(mockCache.createGatewayReceiverFactory()).thenReturn(mockGatewayReceiverFactory);

      GatewayReceiverFactoryBean factoryBean = new GatewayReceiverFactoryBean(mockCache);

      factoryBean.setName("testDoInitWithIllegalStartEndPorts");
      factoryBean.setStartPort(10240);
View Full Code Here


*/
public class AsyncEventQueueFactoryBeanTest {

  protected Cache createMockCacheWithAsyncEventQueueInfrastructure(
      final AsyncEventQueueFactory mockAsynEventQueueFactory) {
    Cache mockCache = mock(Cache.class);
    when((mockCache.createAsyncEventQueueFactory())).thenReturn(mockAsynEventQueueFactory);
    return mockCache;
  }
View Full Code Here

  }

  @SuppressWarnings("rawtypes")
  @Test
  public void testGatewaysInGemfire() {
    Cache cache = ctx.getBean("gemfireCache", Cache.class);
    GatewayHub gwh = cache.getGatewayHub("gateway-hub");
    assertNotNull(gwh);

    Region region = ctx.getBean("region-with-gateway", Region.class);
    assertTrue(region.getAttributes().getEnableGateway());
    assertEquals("gateway-hub", region.getAttributes().getGatewayHubId());
View Full Code Here

  }

  @Test
  @SuppressWarnings("rawtypes")
  public void testRegionLookup() throws Exception {
    Cache cache = context.getBean(Cache.class);
    Region existing = cache.createRegionFactory().create("existing");

    assertTrue(context.containsBean("lookup"));

    RegionLookupFactoryBean regionLookupFactoryBean = context.getBean("&lookup", RegionLookupFactoryBean.class);
View Full Code Here

TOP

Related Classes of com.gemstone.gemfire.cache.Cache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.