Search in sources :

Example 21 with DiskStoreDetails

use of org.apache.geode.management.internal.cli.domain.DiskStoreDetails in project geode by apache.

the class DescribeDiskStoreFunctionJUnitTest method testSetPdxSerializationDetailsWhenPdxIsNotPersistent.

@Test
public void testSetPdxSerializationDetailsWhenPdxIsNotPersistent() {
    final InternalCache mockCache = mockContext.mock(InternalCache.class, "Cache");
    final DiskStore mockDiskStore = mockContext.mock(DiskStore.class, "DiskStore");
    mockContext.checking(new Expectations() {

        {
            oneOf(mockCache).getPdxPersistent();
            will(returnValue(false));
        }
    });
    final DiskStoreDetails diskStoreDetails = new DiskStoreDetails("testDiskStore", "memberOne");
    final DescribeDiskStoreFunction function = createDescribeDiskStoreFunction(mockCache);
    function.setPdxSerializationDetails(mockCache, mockDiskStore, diskStoreDetails);
    assertFalse(diskStoreDetails.isPdxSerializationMetaDataStored());
}
Also used : DiskStore(org.apache.geode.cache.DiskStore) Expectations(org.jmock.Expectations) DiskStoreDetails(org.apache.geode.management.internal.cli.domain.DiskStoreDetails) InternalCache(org.apache.geode.internal.cache.InternalCache) UnitTest(org.apache.geode.test.junit.categories.UnitTest) Test(org.junit.Test)

Aggregations

DiskStoreDetails (org.apache.geode.management.internal.cli.domain.DiskStoreDetails)21 InternalCache (org.apache.geode.internal.cache.InternalCache)15 UnitTest (org.apache.geode.test.junit.categories.UnitTest)13 Expectations (org.jmock.Expectations)13 Test (org.junit.Test)13 DiskStore (org.apache.geode.cache.DiskStore)9 DistributedMember (org.apache.geode.distributed.DistributedMember)6 ArrayList (java.util.ArrayList)5 Set (java.util.Set)5 FunctionContext (org.apache.geode.cache.execute.FunctionContext)4 InternalDistributedMember (org.apache.geode.distributed.internal.membership.InternalDistributedMember)4 AbstractExecution (org.apache.geode.internal.cache.execute.AbstractExecution)4 Cache (org.apache.geode.cache.Cache)3 ResultCollector (org.apache.geode.cache.execute.ResultCollector)3 ListDiskStoresFunction (org.apache.geode.management.internal.cli.functions.ListDiskStoresFunction)3 HashSet (java.util.HashSet)2 List (java.util.List)2 UUID (java.util.UUID)2 Execution (org.apache.geode.cache.execute.Execution)2 CacheServer (org.apache.geode.cache.server.CacheServer)2