Package org.mojavemvc.marshalling

Examples of org.mojavemvc.marshalling.PlainTextEntityMarshaller.unmarshall()


    public void plainTextEntityMarshallerUnmarshallsString() {
       
        PlainTextEntityMarshaller m = new PlainTextEntityMarshaller();
        String text = "test";
        ByteArrayInputStream in = new ByteArrayInputStream(text.getBytes());
        String entity = m.unmarshall(in, String.class);
        assertNotNull(entity);
        assertEquals("test", entity);
    }
   
    @Test
View Full Code Here


    public void plainTextEntityMarshallerUnmarshallsSimplePojo() {
       
        PlainTextEntityMarshaller m = new PlainTextEntityMarshaller();
        String text = "test";
        ByteArrayInputStream in = new ByteArrayInputStream(text.getBytes());
        SimplePojo entity = m.unmarshall(in, SimplePojo.class);
        assertNotNull(entity);
        assertEquals("test", entity.getVal());
    }
   
   
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.