Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Ivanov <[email protected]>
  • Loading branch information
0xivanov committed Nov 29, 2024
1 parent 9197c93 commit 33890b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,8 @@ void keyByteSerialization2() {
@Test
void keyByteValidation() {
byte[] invalidKeyECDSA = new byte[33];
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> PublicKey.fromBytes(invalidKeyECDSA));

assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> PublicKey.fromBytesECDSA(invalidKeyECDSA));
assertDoesNotThrow(() -> PublicKey.fromBytes(invalidKeyECDSA));
assertDoesNotThrow(() -> PublicKey.fromBytesECDSA(invalidKeyECDSA));

byte[] invalidCompressedKey = new byte[]{
0x00,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ void verifyTransaction() {
@Test
void keyByteValidation() {
byte[] invalidKeyED25519 = new byte[32];
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> PublicKey.fromBytes(invalidKeyED25519));

assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> PublicKey.fromBytesED25519(invalidKeyED25519));
assertDoesNotThrow(() -> PublicKey.fromBytes(invalidKeyED25519));
assertDoesNotThrow(() -> PublicKey.fromBytesED25519(invalidKeyED25519));

byte[] invalidKey = new byte[]{
0x00,
Expand Down

0 comments on commit 33890b2

Please sign in to comment.