Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoayyed committed Mar 30, 2020
1 parent 076cfc6 commit eb2368f
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package org.apereo.cas.util.cipher;

import org.apereo.cas.util.crypto.CipherExecutor;

import lombok.val;
import org.apache.commons.lang3.ArrayUtils;
import org.junit.jupiter.api.Test;

import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;

import static org.junit.jupiter.api.Assertions.*;
import java.security.InvalidAlgorithmParameterException;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

/**
* Test cases for {@link BaseBinaryCipherExecutor}.
Expand All @@ -36,8 +35,8 @@ public void checkEncodingDecodingBadKeys() {
final CipherExecutor<byte[], byte[]> cc = new TestBinaryCipherExecutor("0000",
"1234", 512, 16) {
};

assertThrows(InvalidKeyException.class, () -> cc.encode(TEST_VALUE.getBytes(StandardCharsets.UTF_8), ArrayUtils.EMPTY_OBJECT_ARRAY));
assertThrows(InvalidAlgorithmParameterException.class,
() -> cc.encode(TEST_VALUE.getBytes(StandardCharsets.UTF_8), ArrayUtils.EMPTY_OBJECT_ARRAY));
}

@Test
Expand Down

0 comments on commit eb2368f

Please sign in to comment.