-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
32 additions
and
25 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/main/java/com/faystmax/binance/api/client/exception/HmacSHA256SignException.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,7 @@ | ||
package com.faystmax.binance.api.client.exception; | ||
|
||
public class HmacSHA256SignException extends RuntimeException { | ||
public HmacSHA256SignException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
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
8 changes: 3 additions & 5 deletions
8
src/test/java/com/faystmax/binance/api/client/BinanceApiClientErrorTest.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,17 +1,15 @@ | ||
package com.faystmax.binance.api.client; | ||
|
||
import com.faystmax.binance.api.client.exception.BinanceApiException; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static com.faystmax.binance.api.client.BinanceApiClientTestConstant.SYMBOL; | ||
import static com.faystmax.binance.api.client.BinanceApiClientTestConstants.SYMBOL; | ||
import static org.junit.jupiter.api.Assertions.assertThrows; | ||
|
||
class BinanceApiClientErrorTest { | ||
@Test | ||
void testApiError() { | ||
var apiClient = BinanceApiClientFactory.create("test", "test"); | ||
Assertions.assertThrows(BinanceApiException.class, () -> { | ||
apiClient.getMyTrades(SYMBOL); | ||
}); | ||
assertThrows(BinanceApiException.class, () -> apiClient.getMyTrades(SYMBOL)); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
.../client/BinanceApiClientTestConstant.java → ...client/BinanceApiClientTestConstants.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,5 +1,5 @@ | ||
package com.faystmax.binance.api.client; | ||
|
||
class BinanceApiClientTestConstant { | ||
class BinanceApiClientTestConstants { | ||
public static final String SYMBOL = "ETHUSDT"; | ||
} |