mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-24 11:57:59 +01:00
Rework FingerprintTest
This commit is contained in:
parent
3a5c0de90b
commit
5d1377c438
1 changed files with 9 additions and 3 deletions
|
@ -8,17 +8,23 @@ import kotlin.test.assertFalse
|
|||
class FingerprintTest {
|
||||
|
||||
@Test
|
||||
fun testConstructor() {
|
||||
fun `verify that Fingerprint applies an uppercase() on the constructor argument`() {
|
||||
val fromLowerCase = Fingerprint("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
|
||||
assertEquals("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", fromLowerCase.fingerprint)
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun `verify that objects constructed from the lower- and uppercase representation do equal`() {
|
||||
val finger1 = Fingerprint("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
|
||||
val finger2 = Fingerprint("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
|
||||
|
||||
assert(finger1 == finger2)
|
||||
assertEquals("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", finger1.fingerprint)
|
||||
assertEquals(finger1.hashCode(), finger2.hashCode())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testEquals() {
|
||||
fun `verify the proper function of the equals() method and == operator`() {
|
||||
val finger1 = Fingerprint("0000000000000000000000000000000000000000")
|
||||
val finger2 = Fingerprint("1111111111111111111111111111111111111111")
|
||||
|
||||
|
|
Loading…
Reference in a new issue