1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-26 13:34:49 +02:00

Test CertificationSet.toString()

This commit is contained in:
Paul Schaub 2023-06-30 18:05:37 +02:00
parent 4adc2722bd
commit 2b72abb4e5
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -65,4 +65,16 @@ class CertificationSetTest {
set.merge(set)
assertEquals(2, set.certifications.size)
}
@Test
fun testToString() {
val empty = CertificationSet.empty(alice, bob)
assertEquals("", empty.toString())
val twoCerts = CertificationSet.fromCertification(aliceSignsBob)
twoCerts.add(aliceSignsBobUserId)
assertEquals("0000000000000000000000000000000000000000 delegates to 1111111111111111111111111111111111111111\n" +
"0000000000000000000000000000000000000000 certifies [Bob <bob@example.org>] 1111111111111111111111111111111111111111", twoCerts.toString())
}
}