mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-08 09:49:44 +02:00
CertifyValidateUserIdTest: unbound User-IDs do throw exceptions
This commit is contained in:
parent
61206dde53
commit
e1d048225b
1 changed files with 25 additions and 24 deletions
|
@ -14,7 +14,6 @@ import sop.exception.SOPGPException;
|
|||
import java.io.IOException;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
@ -53,7 +52,8 @@ public class CertifyValidateUserIdTest {
|
|||
"Alice accepts her own self-certified user-id");
|
||||
|
||||
// Alice has not yet certified Bobs user-id
|
||||
assertFalse(sop.validateUserId()
|
||||
assertThrows(SOPGPException.CertUserIdNoMatch.class, () ->
|
||||
sop.validateUserId()
|
||||
.authorities(aliceCert)
|
||||
.userId("Bob <bob@pgpainless.org>")
|
||||
.subjects(bobCert),
|
||||
|
@ -152,7 +152,8 @@ public class CertifyValidateUserIdTest {
|
|||
.subjects(bobWithPetName),
|
||||
"Alice accepts the pet-name she gave to Bob");
|
||||
|
||||
assertFalse(sop.validateUserId()
|
||||
assertThrows(SOPGPException.CertUserIdNoMatch.class, () ->
|
||||
sop.validateUserId()
|
||||
.userId("Bobby")
|
||||
.authorities(bobWithPetName)
|
||||
.subjects(bobWithPetName),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue