Package com.xeiam.xchange.bitstamp.dto.polling

Source Code of com.xeiam.xchange.bitstamp.dto.polling.BitstampBooleanResponseDeserializerTest

package com.xeiam.xchange.bitstamp.dto.polling;

import java.io.IOException;

import org.junit.Assert;
import org.junit.Test;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.xeiam.xchange.bitstamp.dto.account.BitstampBooleanResponse;

/**
* @author gnandiga
*/
public class BitstampBooleanResponseDeserializerTest {

  @Test
  public void verifyDeserialize() throws IOException {

    ObjectMapper mapper = new ObjectMapper();
    BitstampBooleanResponse response = mapper.readValue("{\"error\": \"User not verified\"}", BitstampBooleanResponse.class);

    Assert.assertEquals("User not verified", response.getError());

    response = mapper.readValue("true", BitstampBooleanResponse.class);

    Assert.assertTrue(response.getResponse());

  }
}
TOP

Related Classes of com.xeiam.xchange.bitstamp.dto.polling.BitstampBooleanResponseDeserializerTest

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.