Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #989 from radumiron/develop
Loading CoinbaseEx exchange symbols from the exchange itself
- Loading branch information
Showing
4 changed files
with
48 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 10 additions & 4 deletions
14
xchange-coinbaseex/src/test/java/com/xeiam/xchange/coinbaseex/CoinbaseExExchangeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
package com.xeiam.xchange.coinbaseex; | ||
|
||
import com.xeiam.xchange.ExchangeFactory; | ||
import com.xeiam.xchange.currency.CurrencyPair; | ||
import org.junit.Test; | ||
|
||
import java.io.IOException; | ||
import java.util.Arrays; | ||
|
||
import static org.fest.assertions.api.Assertions.assertThat; | ||
|
||
public class CoinbaseExExchangeTest { | ||
|
||
@Test | ||
public void coinbaseShouldBeInstantiatedWithoutAnExceptionWhenUsingDefaultSpecification() { | ||
ExchangeFactory.INSTANCE.createExchange(CoinbaseExExchange.class.getCanonicalName()); | ||
} | ||
@Test | ||
public void coinbaseShouldBeInstantiatedWithoutAnExceptionWhenUsingDefaultSpecification() { | ||
ExchangeFactory.INSTANCE.createExchange(CoinbaseExExchange.class.getCanonicalName()); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...m/xeiam/xchange/coinbaseex/service/marketdata/CoinbaseExAvailableProductsIntegration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.xeiam.xchange.coinbaseex.service.marketdata; | ||
|
||
import com.xeiam.xchange.coinbaseex.CoinbaseExExchange; | ||
import com.xeiam.xchange.currency.CurrencyPair; | ||
import org.junit.Test; | ||
|
||
import java.io.IOException; | ||
import java.util.Arrays; | ||
|
||
import static org.fest.assertions.api.Assertions.assertThat; | ||
|
||
/** | ||
* Created by Radu on 6/17/2015. | ||
*/ | ||
public class CoinbaseExAvailableProductsIntegration { | ||
|
||
@Test | ||
public void testCoinbaseCurrencies() throws IOException { | ||
CoinbaseExExchange exchange = new CoinbaseExExchange(); | ||
exchange.applySpecification(exchange.getDefaultExchangeSpecification()); | ||
|
||
assertThat(exchange.getPollingMarketDataService().getExchangeSymbols()).containsAll( | ||
Arrays.asList(new CurrencyPair("BTC/USD"), new CurrencyPair("BTC/GBP"), new CurrencyPair("BTC/EUR")) | ||
); | ||
} | ||
} |