Package org.jclouds.xml

Examples of org.jclouds.xml.XMLParser.fromXML()


    */
   public static void assertPayloadEquals(final Payload payload, final String expected,
         final Class<? extends SingleResourceTransportDto> entityClass) throws IOException {
      // Serialize and deserialize to avoid formatting issues
      XMLParser xml = new JAXBParser("false");
      SingleResourceTransportDto entity = xml.fromXML(expected, entityClass);
      String toMatch = xml.toXML(entity, entityClass);

      assertEquals(payload.getRawContent(), toMatch);
   }
}
View Full Code Here


    */
   public static void assertPayloadEquals(final Payload payload, final String expected,
         final Class<? extends SingleResourceTransportDto> entityClass) throws IOException {
      // Serialize and deserialize to avoid formatting issues
      XMLParser xml = new JAXBParser("false");
      SingleResourceTransportDto entity = xml.fromXML(expected, entityClass);
      String toMatch = xml.toXML(entity, entityClass);

      assertEquals(payload.getRawContent(), toMatch);
   }
}
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.