Package com.xeiam.xchange.campbx.dto

Source Code of com.xeiam.xchange.campbx.dto.MyFundsJSONTest

package com.xeiam.xchange.campbx.dto;

import static org.fest.assertions.api.Assertions.assertThat;

import java.io.IOException;
import java.math.BigDecimal;

import org.junit.Test;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.xeiam.xchange.campbx.dto.account.MyFunds;

/**
* Test BitStamp Full Depth JSON parsing
*/
public class MyFundsJSONTest {

  @Test
  public void testUnmarshal() throws IOException {

    MyFunds myFunds = new ObjectMapper().readValue(MyFundsJSONTest.class.getResourceAsStream("/account/myfunds.json"), MyFunds.class);

    // Verify that the example data was unmarshalled correctly
    assertThat(myFunds.getLiquidUSD()).isEqualTo(new BigDecimal("0.00"));
    assertThat(myFunds.getTotalBTC()).isEqualTo(new BigDecimal("0.10000000"));
  }
}
TOP

Related Classes of com.xeiam.xchange.campbx.dto.MyFundsJSONTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.