Search in sources :

Example 1 with BuyStocksDocument

use of samples.services.xsd.BuyStocksDocument in project camel by apache.

the class UnmarshalTest method assertBuyStocks.

private void assertBuyStocks(Object result) {
    BuyStocks buyStocks = ((BuyStocksDocument) result).getBuyStocks();
    assertEquals(1, buyStocks.getOrderArray().length);
    assertEquals("IBM", buyStocks.getOrderArray(0).getSymbol());
    assertEquals("cmueller", buyStocks.getOrderArray(0).getBuyerID());
    assertEquals(140.34, buyStocks.getOrderArray(0).getPrice(), 0);
    assertEquals(2000, buyStocks.getOrderArray(0).getVolume());
}
Also used : BuyStocks(samples.services.xsd.BuyStocksDocument.BuyStocks) BuyStocksDocument(samples.services.xsd.BuyStocksDocument)

Example 2 with BuyStocksDocument

use of samples.services.xsd.BuyStocksDocument in project camel by apache.

the class MarshalTest method createBuyStocksDocument.

private BuyStocksDocument createBuyStocksDocument() {
    BuyStocksDocument document = BuyStocksDocument.Factory.newInstance();
    BuyStocks payload = document.addNewBuyStocks();
    Order order = payload.addNewOrder();
    order.setSymbol("IBM");
    order.setBuyerID("cmueller");
    order.setPrice(140.34);
    order.setVolume(2000);
    return document;
}
Also used : Order(samples.services.xsd.Order) BuyStocks(samples.services.xsd.BuyStocksDocument.BuyStocks) BuyStocksDocument(samples.services.xsd.BuyStocksDocument)

Example 3 with BuyStocksDocument

use of samples.services.xsd.BuyStocksDocument in project camel by apache.

the class XmlBeansConverterTest method assertBuyStocks.

private void assertBuyStocks(Object result) {
    BuyStocks buyStocks = ((BuyStocksDocument) result).getBuyStocks();
    assertEquals(1, buyStocks.getOrderArray().length);
    assertEquals("IBM", buyStocks.getOrderArray(0).getSymbol());
    assertEquals("cmueller", buyStocks.getOrderArray(0).getBuyerID());
    assertEquals(140.34, buyStocks.getOrderArray(0).getPrice(), 0);
    assertEquals(2000, buyStocks.getOrderArray(0).getVolume());
}
Also used : BuyStocks(samples.services.xsd.BuyStocksDocument.BuyStocks) BuyStocksDocument(samples.services.xsd.BuyStocksDocument)

Example 4 with BuyStocksDocument

use of samples.services.xsd.BuyStocksDocument in project camel by apache.

the class XmlBeansDslTest method createBuyStocksDocument.

private BuyStocksDocument createBuyStocksDocument() {
    BuyStocksDocument document = BuyStocksDocument.Factory.newInstance();
    BuyStocks payload = document.addNewBuyStocks();
    Order order = payload.addNewOrder();
    order.setSymbol("IBM");
    order.setBuyerID("cmueller");
    order.setPrice(140.34);
    order.setVolume(2000);
    return document;
}
Also used : Order(samples.services.xsd.Order) BuyStocks(samples.services.xsd.BuyStocksDocument.BuyStocks) BuyStocksDocument(samples.services.xsd.BuyStocksDocument)

Aggregations

BuyStocksDocument (samples.services.xsd.BuyStocksDocument)4 BuyStocks (samples.services.xsd.BuyStocksDocument.BuyStocks)4 Order (samples.services.xsd.Order)2