mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-25 04:17:59 +01:00
Test CertificationSet.toString()
This commit is contained in:
parent
3ddb73c1d6
commit
8768ebaafd
1 changed files with 12 additions and 0 deletions
|
@ -65,4 +65,16 @@ class CertificationSetTest {
|
||||||
set.merge(set)
|
set.merge(set)
|
||||||
assertEquals(2, set.certifications.size)
|
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())
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue