Package org.springframework.data.redis

Examples of org.springframework.data.redis.Address


  }

  @Test
  public void testPersonSerialization() throws Exception {
    String value = UUID.randomUUID().toString();
    Person p1 = new Person(value, value, 1, new Address(value, 2));
    assertEquals(p1, serializer.deserialize(serializer.serialize(p1)));
    assertEquals(p1, serializer.deserialize(serializer.serialize(p1)));
  }
View Full Code Here


    xstream.afterPropertiesSet();

    OxmSerializer serializer = new OxmSerializer(xstream, xstream);

    String value = UUID.randomUUID().toString();
    Person p1 = new Person(value, value, 1, new Address(value, 2));
    assertEquals(p1, serializer.deserialize(serializer.serialize(p1)));
    assertEquals(p1, serializer.deserialize(serializer.serialize(p1)));
  }
View Full Code Here

  @Test
  public void testJsonSerializer() throws Exception {
    JacksonJsonRedisSerializer<Person> serializer = new JacksonJsonRedisSerializer<Person>(Person.class);
    String value = UUID.randomUUID().toString();
    Person p1 = new Person(value, value, 1, new Address(value, 2));
    assertEquals(p1, serializer.deserialize(serializer.serialize(p1)));
    assertEquals(p1, serializer.deserialize(serializer.serialize(p1)));
  }
View Full Code Here

    assertEquals(o, mapper.fromHash(hash));
  }

  @Test
  public void testSimpleBean() throws Exception {
    test(new Address("Broadway", 1));
  }
View Full Code Here

    test(new Address("Broadway", 1));
  }

  @Test
  public void testNestedBean() throws Exception {
    test(new Person("George", "Enescu", 74, new Address("liveni", 19)));
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.redis.Address

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.