Package com.bla.bla

Examples of com.bla.bla.ShipOrder


    public void reader() throws XMLStreamException, FileNotFoundException {
        final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
        final XMLStreamReader xmlr = inputFactory.createXMLStreamReader(new FileInputStream(new File(Root.testResourcesDirectory(), "ShipOrder.xml")));

        ShipOrderMapper shipOrderMapper = new ShipOrderMapper();
        final ShipOrder shipOrder = shipOrderMapper.readShipOrderDocument(xmlr);
        assertEquals("124453", shipOrder.getOrderId());
        assertEquals("1234567890123456", shipOrder.getOrderPerson());
        assertEquals("name", shipOrder.getShipTo().getName());
        assertEquals("address", shipOrder.getShipTo().getAddress());
        assertEquals("city", shipOrder.getShipTo().getCity());
        assertEquals("country", shipOrder.getShipTo().getCountry());
        assertEquals("title", shipOrder.getItem().getTitle());
        assertEquals("note", shipOrder.getItem().getNote());
        assertEquals("5", shipOrder.getItem().getQuantity());
        assertEquals("22", shipOrder.getItem().getPrice());
    }
View Full Code Here


public class WriterGeneratorTest {
  @Test
  public void test() throws XMLStreamException {
    final HandWrittenImmutableModelWriter modelSerializer = new HandWrittenImmutableModelWriter();
    ShipOrder shipOrder = new ShipOrder("weiro", new ShipTo("name", "address", "city", "country"), new Item("title", "note", "quantity", "price"), "1234");

    final XMLStreamWriter xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
    modelSerializer.write(shipOrder, xmlWriter);
  }
View Full Code Here

TOP

Related Classes of com.bla.bla.ShipOrder

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.