1 package org.oxerr.okcoin.rest.dto;
2
3 import static org.junit.Assert.assertEquals;
4
5 import java.io.IOException;
6
7 import org.junit.Test;
8
9 public class BatchTradeResultTest extends UnmarshalTest {
10
11 @Test
12 public void test() throws IOException {
13 BatchTradeResult result = readValue("batch_trade.json", BatchTradeResult.class);
14 assertEquals(41724206L, result.getOrderInfo()[0].getOrderId());
15
16 assertEquals(Integer.valueOf(10011), result.getOrderInfo()[1].getErrorCode());
17 assertEquals(-1, result.getOrderInfo()[1].getOrderId());
18
19 assertEquals(Integer.valueOf(10014), result.getOrderInfo()[2].getErrorCode());
20 assertEquals(-1, result.getOrderInfo()[2].getOrderId());
21 }
22
23 }