Examples of SerializableFactory


Examples of org.springmodules.cache.serializable.SerializableFactory

  }

  public void testMakeSerializableIfNecessaryWhenSerializableIsRequiredAndSerializableFactoryIsNotNullAndEntryIsNotSerializable() {
    MockControl factoryControl = MockControl
        .createControl(SerializableFactory.class);
    SerializableFactory factory = (SerializableFactory) factoryControl
        .getMock();
    cacheProviderFacade.setSerializableFactory(factory);

    cacheProviderFacadeControl.expectAndReturn(cacheProviderFacade
        .isSerializableCacheElementRequired(), true);
    cacheProviderFacadeControl.replay();

    Serializable expected = "Leia";
    Object objectToStore = new Object();
    factoryControl.expectAndReturn(factory
        .makeSerializableIfNecessary(objectToStore), expected);
    factoryControl.replay();

    Object actual = cacheProviderFacade
        .makeSerializableIfNecessary(objectToStore);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.