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,6 +1,7 @@
|
|||
package info.frostfs.sdk;
|
||||
|
||||
import com.google.protobuf.Message;
|
||||
import info.frostfs.sdk.exceptions.ValidationFrostFSException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
@ -25,7 +26,7 @@ public class HelperTest {
|
|||
@Test
|
||||
void getRipemd160_givenParamIsNull() {
|
||||
//When + Then
|
||||
assertThrows(IllegalArgumentException.class, () -> Helper.getRipemd160(null));
|
||||
assertThrows(ValidationFrostFSException.class, () -> Helper.getRipemd160(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -69,8 +70,8 @@ public class HelperTest {
|
|||
@Test
|
||||
void getSha256_bytes_givenParamIsNull() {
|
||||
//When + Then
|
||||
assertThrows(IllegalArgumentException.class, () -> Helper.getSha256((byte[]) null));
|
||||
assertThrows(IllegalArgumentException.class, () -> Helper.getSha256((Message) null));
|
||||
assertThrows(ValidationFrostFSException.class, () -> Helper.getSha256((byte[]) null));
|
||||
assertThrows(ValidationFrostFSException.class, () -> Helper.getSha256((Message) null));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -104,7 +105,7 @@ public class HelperTest {
|
|||
@Test
|
||||
void getHexString_wrong() {
|
||||
//When + Then
|
||||
assertThrows(IllegalArgumentException.class, () -> Helper.getHexString(null));
|
||||
assertThrows(IllegalArgumentException.class, () -> Helper.getHexString(new byte[]{}));
|
||||
assertThrows(ValidationFrostFSException.class, () -> Helper.getHexString(null));
|
||||
assertThrows(ValidationFrostFSException.class, () -> Helper.getHexString(new byte[]{}));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue