use of org.knowm.xchange.kraken.dto.trade.results.KrakenCancelOrderResult in project XChange by knowm.
the class KrakenTradeJsonTest method testCancelOrderUnmarshal.
@Test
public void testCancelOrderUnmarshal() throws IOException {
// Read in the JSON from the example resources
InputStream is = KrakenTradeJsonTest.class.getResourceAsStream("/org/knowm/xchange/kraken/dto/trading/example-cancelorder-data.json");
// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
KrakenCancelOrderResult krakenResult = mapper.readValue(is, KrakenCancelOrderResult.class);
KrakenCancelOrderResponse cancelOrderResponse = krakenResult.getResult();
assertThat(cancelOrderResponse.getCount()).isEqualTo(1);
assertFalse(cancelOrderResponse.isPending());
}
Aggregations