Package net.buffalo.protocal.converters.map

Examples of net.buffalo.protocal.converters.map.ObjectConverter.canConvert()


 
  public void testShouldSerializeParentClass() throws Exception {
    ObjectConverter os = new ObjectConverter();
    BirthdayPeople people = new BirthdayPeople();
    people.setBirthday(new Date());
    assertTrue(os.canConvert(BirthdayPeople.class));
    os.marshal(people, context, streamWriter);
    String output = stringWriter.getBuffer().toString();
    assertTrue(output.indexOf("date")>-1);
    assertTrue(output.indexOf("name") > -1);
    assertEquals(1, context.getObjects().size());
View Full Code Here


    context = new DefaultMarshallingContext(new DefaultConverterLookup(), streamWriter);
  }
 
  public void testShouldSerializeObject() throws Exception {
    ObjectConverter os = new ObjectConverter();
    assertFalse(os.canConvert(null));
    People people = new People();
    assertTrue(os.canConvert(People.class));
   
    os.marshal(people, context, streamWriter);
    String string = "<map>" +
View Full Code Here

 
  public void testShouldSerializeObject() throws Exception {
    ObjectConverter os = new ObjectConverter();
    assertFalse(os.canConvert(null));
    People people = new People();
    assertTrue(os.canConvert(People.class));
   
    os.marshal(people, context, streamWriter);
    String string = "<map>" +
            "<type>net.buffalo.protocal.People</type>" +
            "<string>name</string>" +
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.