Skip to content

Commit

Permalink
refactor: Renamed Coinbase classes (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
gazbert committed Nov 16, 2024
1 parent 52fb1b6 commit b8095c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void setupForEachTest() {
public void testPublicApiCalls() throws Exception {
replay(authenticationConfig, networkConfig, otherConfig, exchangeConfig);

final ExchangeAdapter exchangeAdapter = new CoinbaseAdvancedExchangeAdapter();
final ExchangeAdapter exchangeAdapter = new CoinbaseExchangeAdapter();
exchangeAdapter.init(exchangeConfig);

final MarketOrderBook orderBook = exchangeAdapter.getMarketOrders(MARKET_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
* @since 1.0
*/
@Log4j2
public class CoinbaseAdvancedExchangeAdapter extends AbstractExchangeAdapter
public class CoinbaseExchangeAdapter extends AbstractExchangeAdapter
implements ExchangeAdapter {

private static final String EXCHANGE_ADAPTER_NAME = "Coinbase Advanced Trade REST API v3";
Expand Down Expand Up @@ -94,7 +94,7 @@ public class CoinbaseAdvancedExchangeAdapter extends AbstractExchangeAdapter
private Gson gson;

/** Constructs the Exchange Adapter. */
public CoinbaseAdvancedExchangeAdapter() {
public CoinbaseExchangeAdapter() {
// No extra init.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"org.w3c.dom.*",
"javax.xml.datatype.*"
})
@PrepareForTest(CoinbaseAdvancedExchangeAdapter.class)
public class TestCoinbaseAdvancedExchangeAdapter extends AbstractExchangeAdapterTest {
@PrepareForTest(CoinbaseExchangeAdapter.class)
public class TestCoinbaseExchangeAdapter extends AbstractExchangeAdapterTest {

private static final String PRODUCT_BOOK_JSON_RESPONSE =
"./src/test/exchange-data/coinbase/product_book.json";
Expand Down Expand Up @@ -130,9 +130,9 @@ public void testGettingMarketOrders() throws Exception {
final Map<String, Object> requestParamMap = PowerMock.createMock(Map.class);
expect(requestParamMap.put(PRODUCT_ID_PARAM, MARKET_ID)).andStubReturn(null);

final CoinbaseAdvancedExchangeAdapter exchangeAdapter =
final CoinbaseExchangeAdapter exchangeAdapter =
PowerMock.createPartialMockAndInvokeDefaultConstructor(
CoinbaseAdvancedExchangeAdapter.class,
CoinbaseExchangeAdapter.class,
MOCKED_SEND_PUBLIC_REQUEST_TO_EXCHANGE_METHOD,
MOCKED_CREATE_REQUEST_PARAM_MAP_METHOD);

Expand Down Expand Up @@ -183,7 +183,7 @@ public void testGettingMarketOrders() throws Exception {
@Test
public void testGettingImplNameIsAsExpected() {
PowerMock.replayAll();
final CoinbaseAdvancedExchangeAdapter exchangeAdapter = new CoinbaseAdvancedExchangeAdapter();
final CoinbaseExchangeAdapter exchangeAdapter = new CoinbaseExchangeAdapter();
exchangeAdapter.init(exchangeConfig);

assertEquals("Coinbase Advanced Trade REST API v3", exchangeAdapter.getImplName());
Expand Down

0 comments on commit b8095c6

Please sign in to comment.