// Path: src/main/java/com/github/ccob/bittrex4j/dao/OrderBook.java
// public enum TYPE {
//     buy, sell, both;
// }


import com.github.ccob.bittrex4j.dao.*;
import com.github.ccob.bittrex4j.dao.OrderBook.TYPE;
import com.github.signalr4j.client.hubs.*;
import com.google.gson.Gson;
import com.google.gson.internal.LinkedTreeMap;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.ProtocolVersion;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.message.BasicStatusLine;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.*;
import org.mockito.runners.MockitoJUnitRunner;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Scanner;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.*;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
        setExpectationForJsonResultOnWebAPICall(loadTestResourceAsString("/MarketHistory.json"));
        Response<CompletedOrder[]> result = bittrexExchange.getMarketHistory("ANY");

        assertThat(result.isSuccess(), is(true));
        assertThat(result.getResult().length, equalTo(4));
    }

    @Test
    public void shouldReturnMarkets() throws IOException{
        setExpectationForJsonResultOnWebAPICall(loadTestResourceAsString("/Markets.json"));
        Response<Market[]> result = bittrexExchange.getMarkets();

        assertThat(result.isSuccess(), is(true));
        assertThat(result.getResult().length,equalTo(2));
    }

    @Test
    public void shouldReturnCurrencies() throws IOException{
        setExpectationForJsonResultOnWebAPICall(loadTestResourceAsString("/Currencies.json"));
        Response<Currency[]> result = bittrexExchange.getCurrencies();

        assertThat(result.isSuccess(), is(true));
        assertThat(result.getResult().length,equalTo(2));
    }

    @Test
    public void shouldReturnTicker() throws IOException{
        setExpectationForJsonResultOnWebAPICall(loadTestResourceAsString("/Ticker.json"));
        Response<Ticker> result = bittrexExchange.getTicker("ANY");

// Path: src/main/java/com/github/ccob/bittrex4j/dao/OrderBook.java
// public enum TYPE {
//     buy, sell, both;
// }


// Path: src/test/java/com/github/ccob/bittrex4j/BittrexExchangeTest.java
import com.github.ccob.bittrex4j.dao.*;
import com.github.ccob.bittrex4j.dao.OrderBook.TYPE;
import com.github.signalr4j.client.hubs.*;
import com.google.gson.Gson;
import com.google.gson.internal.LinkedTreeMap;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.ProtocolVersion;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.message.BasicStatusLine;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.*;
import org.mockito.runners.MockitoJUnitRunner;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Scanner;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.*;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

        setExpectationForJsonResultOnWebAPICall(loadTestResourceAsString("/MarketHistory.json"));
        Response<CompletedOrder[]> result = bittrexExchange.getMarketHistory("ANY");

        assertThat(result.isSuccess(), is(true));
        assertThat(result.getResult().length, equalTo(4));
    }

    @Test
    public void shouldReturnMarkets() throws IOException{
        setExpectationForJsonResultOnWebAPICall(loadTestResourceAsString("/Markets.json"));
        Response<Market[]> result = bittrexExchange.getMarkets();

        assertThat(result.isSuccess(), is(true));
        assertThat(result.getResult().length,equalTo(2));
    }

    @Test
    public void shouldReturnCurrencies() throws IOException{
        setExpectationForJsonResultOnWebAPICall(loadTestResourceAsString("/Currencies.json"));
        Response<Currency[]> result = bittrexExchange.getCurrencies();

        assertThat(result.isSuccess(), is(true));
        assertThat(result.getResult().length,equalTo(2));
    }

    @Test
    public void shouldReturnTicker() throws IOException{
        setExpectationForJsonResultOnWebAPICall(loadTestResourceAsString("/Ticker.json"));
        Response<Ticker> result = bittrexExchange.getTicker("ANY");

        assertThat(result.isSuccess(), is(true));