forked from TrueCloudLab/frostfs-sdk-java
[#14] add lombok and refactor exceptions. Provide validator.
Signed-off-by: Ori Bruk <o.bruk@yadro.com>
This commit is contained in:
parent
15cf0893c7
commit
388428af76
87 changed files with 819 additions and 970 deletions
|
@ -1,5 +1,7 @@
|
|||
package info.frostfs.sdk;
|
||||
|
||||
import info.frostfs.sdk.exceptions.ProcessFrostFSException;
|
||||
import info.frostfs.sdk.exceptions.ValidationFrostFSException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
@ -31,10 +33,10 @@ public class Base58Test {
|
|||
@Test
|
||||
void base58Decode_wrong() {
|
||||
//When + Then
|
||||
assertThrows(IllegalArgumentException.class, () -> Base58.base58CheckDecode(null));
|
||||
assertThrows(IllegalArgumentException.class, () -> Base58.base58CheckDecode(""));
|
||||
assertThrows(IllegalArgumentException.class, () -> Base58.base58CheckDecode("WIF"));
|
||||
assertThrows(IllegalArgumentException.class, () -> Base58.base58CheckDecode("fh"));
|
||||
assertThrows(ValidationFrostFSException.class, () -> Base58.base58CheckDecode(null));
|
||||
assertThrows(ValidationFrostFSException.class, () -> Base58.base58CheckDecode(""));
|
||||
assertThrows(ValidationFrostFSException.class, () -> Base58.base58CheckDecode("WIF"));
|
||||
assertThrows(ProcessFrostFSException.class, () -> Base58.base58CheckDecode("fh"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -49,6 +51,6 @@ public class Base58Test {
|
|||
@Test
|
||||
void base58Encode_wrong() {
|
||||
//When + Then
|
||||
assertThrows(IllegalArgumentException.class, () -> Base58.base58CheckEncode(null));
|
||||
assertThrows(ValidationFrostFSException.class, () -> Base58.base58CheckEncode(null));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue