Skip to content

Commit c471c2e

Browse files
committed
fix: remove prints
1 parent 351fb49 commit c471c2e

File tree

4 files changed

+39
-19
lines changed

4 files changed

+39
-19
lines changed

src/main/java/com/cryptomarket/sdk/rest/CryptomarketRestClientImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,6 @@ public List<Fee> getEstimateWithdrawalFees(List<FeeRequest> feeRequests) throws
904904
String jsonResponse = httpClient.post(
905905
"wallet/crypto/fees/estimate",
906906
payload);
907-
System.out.println(jsonResponse);
908907
return adapter.listFromJson(jsonResponse, Fee.class);
909908
}
910909

src/test/java/com/cryptomarket/sdk/TestRestClientMarketData.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ public void getConvertedCandles() throws CryptomarketSDKException {
209209
var targetCurrency = "BTC";
210210
var convertedCandles = client.getConvertedCandles(targetCurrency, symbols, Period._4_HOURS, Sort.ASC, null, null,
211211
null);
212-
System.out.println(convertedCandles);
213212
assertEquals(targetCurrency, convertedCandles.getTargetCurrency());
214213
assertTrue(convertedCandles.getData().keySet().size() == 3);
215214
convertedCandles.getData().forEach((key, candleList) -> {
@@ -222,7 +221,6 @@ public void getConvertedCandlesBySymbol() throws CryptomarketSDKException {
222221
var targetCurrency = "BTC";
223222
var convertedCandles = client.getConvertedCandlesBySymbol(targetCurrency, "EOSETH", Period._4_HOURS, Sort.ASC, null,
224223
null, null, null);
225-
System.out.println(convertedCandles);
226224
assertEquals(targetCurrency, convertedCandles.getTargetCurrency());
227225
convertedCandles.getData().forEach(Checker.checkCandle);
228226
}

src/test/java/com/cryptomarket/sdk/TestRestClientSpotTradingHistory.java

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import java.util.List;
44

55
import com.cryptomarket.params.ParamsBuilder;
6+
import com.cryptomarket.params.Sort;
7+
import com.cryptomarket.params.SortBy;
68
import com.cryptomarket.sdk.exceptions.CryptomarketSDKException;
79
import com.cryptomarket.sdk.models.Order;
810
import com.cryptomarket.sdk.models.Trade;
@@ -12,18 +14,41 @@
1214
import org.junit.Test;
1315

1416
public class TestRestClientSpotTradingHistory {
15-
CryptomarketRestClient client = new CryptomarketRestClientImpl(KeyLoader.getApiKey(), KeyLoader.getApiSecret());
16-
17-
@Test
18-
public void testGetOrderHistoryAndGetOrders() throws CryptomarketSDKException {
19-
List<Order> orders = client.getSpotOrderHistory(new ParamsBuilder()
20-
.symbol("EOSETH"));
21-
orders.forEach(Checker.checkOrder);
22-
}
23-
24-
@Test
25-
public void testGetTradingHistory() throws CryptomarketSDKException {
26-
List<Trade> trades = client.getSpotTradesHistory(new ParamsBuilder().limit(12));
27-
trades.forEach(Checker.checkTrade);
28-
}
17+
CryptomarketRestClient client = new CryptomarketRestClientImpl(KeyLoader.getApiKey(), KeyLoader.getApiSecret());
18+
19+
@Test
20+
public void testGetOrderHistoryAndGetOrders() throws CryptomarketSDKException {
21+
List<Order> orders = client.getSpotOrderHistory(new ParamsBuilder()
22+
.symbol("EOSETH"));
23+
orders.forEach(Checker.checkOrder);
24+
}
25+
26+
@Test
27+
public void testGetOrderHistoryAndGetOrdersWithParams() throws CryptomarketSDKException {
28+
List<Order> orders = client.getSpotOrderHistory(new ParamsBuilder()
29+
.by(SortBy.TIMESTAMP)
30+
.sort(Sort.DESC)
31+
.limit(1000)
32+
.offset(0)
33+
.from("1610701510"));
34+
orders.forEach(Checker.checkOrder);
35+
}
36+
37+
@Test
38+
public void testGetTradingHistory() throws CryptomarketSDKException {
39+
List<Trade> trades = client.getSpotTradesHistory(new ParamsBuilder().limit(12));
40+
trades.forEach(Checker.checkTrade);
41+
}
42+
43+
44+
@Test
45+
public void testGetTradingHistoryWithParamsWithParams() throws CryptomarketSDKException {
46+
List<Trade> trades = client.getSpotTradesHistory(new ParamsBuilder()
47+
.by(SortBy.TIMESTAMP)
48+
.sort(Sort.DESC)
49+
.limit(1000)
50+
.offset(0)
51+
.from("1610701510"));
52+
trades.forEach(Checker.checkTrade);
53+
}
2954
}

src/test/java/com/cryptomarket/sdk/TestRestClientWalletManagement.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.cryptomarket.params.OrderBy;
1111
import com.cryptomarket.params.ParamsBuilder;
1212
import com.cryptomarket.params.Sort;
13-
import com.cryptomarket.params.SortBy;
1413
import com.cryptomarket.sdk.exceptions.CryptomarketSDKException;
1514
import com.cryptomarket.sdk.models.Address;
1615
import com.cryptomarket.sdk.models.Balance;
@@ -166,7 +165,6 @@ public void testTransferBetweenWalletAndExchage() throws CryptomarketSDKExceptio
166165
@Test
167166
public void testGetTransactionHistory() throws CryptomarketSDKException {
168167
List<Transaction> transactions = client.getTransactionHistory(new ParamsBuilder());
169-
transactions.stream().forEach(System.out::println);
170168
transactions.forEach(Checker.checkTransaction);
171169
}
172170

0 commit comments

Comments
 (0)