Package org.springmodules.cache.serializable

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

Related Classes of org.springmodules.cache.serializable.SerializableFactory

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.