1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-05 03:55:58 +01:00

Test CertificationSet.toString()

This commit is contained in:
Paul Schaub 2023-06-30 18:05:37 +02:00
parent 3ddb73c1d6
commit 8768ebaafd
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())
}
}