Package org.springmodules.cache.serializable.XStreamSerializableFactory

Examples of org.springmodules.cache.serializable.XStreamSerializableFactory.ObjectWrapper


   */
  public void testEqualsHashCodeRelationship() {
    String obj = "Leia";

    wrapper.setValue(obj);
    ObjectWrapper wrapper2 = new ObjectWrapper(obj);

    assertEqualsHashCodeRelationshipIsCorrect(wrapper, wrapper2);

    obj = null;

    wrapper.setValue(obj);
    wrapper2.setValue(obj);

    assertEqualsHashCodeRelationshipIsCorrect(wrapper, wrapper2);
  }
View Full Code Here


  /**
   * @see org.springmodules.EqualsHashCodeTestCase#testEqualsIsConsistent()
   */
  public void testEqualsIsConsistent() {
    ObjectWrapper wrapper2 = new ObjectWrapper();
    assertEquals(wrapper, wrapper2);

    wrapper2.setValue("Luke");
    assertFalse(wrapper.equals(wrapper2));
  }
View Full Code Here

  /**
   * @see org.springmodules.EqualsHashCodeTestCase#testEqualsIsSymmetric()
   */
  public void testEqualsIsSymmetric() {
    ObjectWrapper wrapper2 = new ObjectWrapper();
    assertEqualsIsSymmetric(wrapper, wrapper2);
  }
View Full Code Here

   */
  public void testEqualsIsTransitive() {
    String obj = "Han";

    wrapper.setValue(obj);
    ObjectWrapper wrapper2 = new ObjectWrapper(obj);
    ObjectWrapper wrapper3 = new ObjectWrapper(obj);

    assertEqualsIsTransitive(wrapper, wrapper2, wrapper3);
  }
View Full Code Here

        + ObjectUtils.getIdentityHexString(wrapper) + "[value=10]";
    assertEquals(wrapper.toString(), actual);
  }

  protected void setUp() {
    wrapper = new ObjectWrapper();
  }
View Full Code Here

    assertEqualsNullComparisonReturnsFalse(serializableFactory);
  }

  public void testGetOriginalValueWithArgumentBeingObjectWrapper() {
  XStream xstream = new XStream();
  ObjectWrapper wrapper = new ObjectWrapper(xstream.toXML(puppy));
    assertEquals(puppy, serializableFactory.getOriginalValue(wrapper));
  }
View Full Code Here

  }

  public void testMakeSerializableIfNecessaryWithNotSerializableArgument()
      throws Exception {
    XStream xstream = new XStream();
    ObjectWrapper expected = new ObjectWrapper(xstream.toXML(puppy));

    Object actual = serializableFactory.makeSerializableIfNecessary(puppy);

    assertEquals(expected, actual);
    SerializationAssert.assertIsSerializable(actual);
View Full Code Here

TOP

Related Classes of org.springmodules.cache.serializable.XStreamSerializableFactory.ObjectWrapper

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.