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 BorrowsInfoTest extends UnmarshalTest { 11 12 @Test 13 public void test() throws IOException { 14 BorrowsInfo borrowsInfo = readValue("borrows_info.json", BorrowsInfo.class); 15 assertEquals(new BigDecimal("0"), borrowsInfo.getBorrowBtc()); 16 assertEquals(new BigDecimal("11.06"), borrowsInfo.getBorrowLtc()); 17 assertEquals(new BigDecimal("0"), borrowsInfo.getBorrowCny()); 18 assertEquals(new BigDecimal("0.03"), borrowsInfo.getCanBorrow()); 19 assertEquals(new BigDecimal("0"), borrowsInfo.getInterestBtc()); 20 assertEquals(new BigDecimal("0.0011"), borrowsInfo.getInterestLtc()); 21 assertEquals(new BigDecimal("0"), borrowsInfo.getInterestCny()); 22 assertEquals(new BigDecimal("0"), borrowsInfo.getTodayInterestBtc()); 23 assertEquals(new BigDecimal("0.0011"), borrowsInfo.getTodayInterestLtc()); 24 assertEquals(new BigDecimal("0"), borrowsInfo.getTodayInterestCny()); 25 } 26 27 }