[#14] add lombok and refactor exceptions. Provide validator.

Signed-off-by: Ori Bruk <o.bruk@yadro.com>
This commit is contained in:
Ori Bruk 2024-09-17 17:47:03 +03:00
parent 15cf0893c7
commit 388428af76
87 changed files with 819 additions and 970 deletions

View file

@ -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));
}
}