Skip to content
Snippets Groups Projects
Commit 1760a13c authored by Martin Vogel's avatar Martin Vogel
Browse files

refactor: add x5c assertions (planning#2175)

parent 5f067d15
No related branches found
No related tags found
1 merge request!148#2175 Fix test key chain
......@@ -23,7 +23,6 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertNull;
class TestKeyGeneratorTest {
......@@ -44,15 +43,12 @@ class TestKeyGeneratorTest {
// Then
assertThat(publicKey, CoreMatchers.is(notNullValue()));
assertThat(publicKey.getKeyID(), CoreMatchers.is(notNullValue()));
assertThat(publicKey.getX509CertChain(), hasSize(1));
assertThat(publicKey.getKeyOperations(), hasSize(1));
assertThat(publicKey.getKeyOperations(), contains(KeyOperation.WRAP_KEY));
assertNull(publicKey.getX509CertChain());
assertThat(publicKey.getKeyType(), CoreMatchers.is(KeyType.RSA));
assertThat( publicKey.getAlgorithm(), CoreMatchers.is(JWEAlgorithm.RSA_OAEP_256));
}
......@@ -136,17 +132,14 @@ class TestKeyGeneratorTest {
// Then
assertThat(publicKey, CoreMatchers.is(CoreMatchers.notNullValue()));
assertThat(publicKey.getKeyID(), CoreMatchers.is(notNullValue()));
assertThat(publicKey.getX509CertChain(), hasSize(1));
assertThat(publicKey.getKeyOperations(), hasSize(1));
assertThat(publicKey.getKeyOperations(), contains(KeyOperation.VERIFY));
assertNull(publicKey.getX509CertChain());
assertThat(publicKey.getKeyType(), CoreMatchers.is(KeyType.RSA));
assertThat( publicKey.getAlgorithm(), CoreMatchers.is(JWSAlgorithm.PS512));
}
@Test
......@@ -174,8 +167,6 @@ class TestKeyGeneratorTest {
// Then
assertThat(privateKey, CoreMatchers.is(notNullValue()));
assertThat(privateKey.getKeyID(), CoreMatchers.is(notNullValue()));
assertThat(privateKey.getKeyOperations(), hasSize(1));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment