1 package org.oxerr.okcoin.rest.dto; 2 3 import static org.junit.Assert.assertEquals; 4 5 import java.io.IOException; 6 import java.math.BigDecimal; 7 8 import org.junit.Test; 9 10 public class LendDepthTest extends UnmarshalTest { 11 12 @Test 13 public void test() throws IOException { 14 LendDepth lendDepth = readValue("lend_depth.json", LendDepth.class); 15 Lend[] lendArray = lendDepth.getLendDepth(); 16 Lend lend = lendArray[0]; 17 assertEquals(new BigDecimal("26272982.5427"), lend.getAmount()); 18 assertEquals("15 - 90", lend.getDays()); 19 assertEquals(14, lend.getNum()); 20 assertEquals(new BigDecimal("0.001"), lend.getRate()); 21 22 lend = lendArray[1]; 23 assertEquals(new BigDecimal("47403.1424"), lend.getAmount()); 24 assertEquals("15", lend.getDays()); 25 assertEquals(1, lend.getNum()); 26 assertEquals(new BigDecimal("0.0013"), lend.getRate()); 27 } 28 29 }