mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-25 04:17:59 +01:00
Atmomize CertificationTest
This commit is contained in:
parent
3069e92cb2
commit
9c1b060034
1 changed files with 17 additions and 1 deletions
|
@ -20,14 +20,30 @@ class CertificationTest {
|
||||||
null,
|
null,
|
||||||
RevocationState.notRevoked(),
|
RevocationState.notRevoked(),
|
||||||
mapOf(Pair("Bob <bob@example.org>", RevocationState.notRevoked())))
|
mapOf(Pair("Bob <bob@example.org>", RevocationState.notRevoked())))
|
||||||
|
private val charlie = CertSynopsis(
|
||||||
|
Fingerprint("22222222222222222222222222222222222222222222"),
|
||||||
|
null,
|
||||||
|
RevocationState.notRevoked(),
|
||||||
|
mapOf())
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testToString() {
|
fun `verify result of toString() on certification`() {
|
||||||
val certification = Certification(alice, "Bob <bob@example.org>", bob, Date())
|
val certification = Certification(alice, "Bob <bob@example.org>", bob, Date())
|
||||||
assertEquals("0000000000000000000000000000000000000000 (Alice <alice@pgpainless.org>) certifies [Bob <bob@example.org>] 1111111111111111111111111111111111111111",
|
assertEquals("0000000000000000000000000000000000000000 (Alice <alice@pgpainless.org>) certifies [Bob <bob@example.org>] 1111111111111111111111111111111111111111",
|
||||||
certification.toString())
|
certification.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `verify result of toString() on delegation`() {
|
||||||
val delegation = Certification(alice, null, bob, Date())
|
val delegation = Certification(alice, null, bob, Date())
|
||||||
assertEquals("0000000000000000000000000000000000000000 (Alice <alice@pgpainless.org>) delegates to 1111111111111111111111111111111111111111",
|
assertEquals("0000000000000000000000000000000000000000 (Alice <alice@pgpainless.org>) delegates to 1111111111111111111111111111111111111111",
|
||||||
delegation.toString())
|
delegation.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `verify result of toString() on delegation with userId-less issuer`() {
|
||||||
|
val delegation = Certification(charlie, null, bob, Date())
|
||||||
|
assertEquals("22222222222222222222222222222222222222222222 delegates to 1111111111111111111111111111111111111111",
|
||||||
|
delegation.toString())
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue