Rewrites CryptTest with matchers

Also renames "expect" to "expected" since "expect" is a newer kotlin keyword.

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-08 16:39:34 -07:00
parent 4d7897dace
commit 4653541a7b

View file

@ -1,6 +1,6 @@
package info.nightscout.pump.medtrum.encryption
import org.junit.jupiter.api.Assertions
import com.google.common.truth.Truth.assertThat
import org.junit.jupiter.api.Test
class CryptTest {
@ -10,9 +10,9 @@ class CryptTest {
val crypt = Crypt()
val input = 2859923929
val expect = 3364239851
val expected = 3364239851L
val output: Long = crypt.keyGen(input)
Assertions.assertEquals(expect, output)
assertThat(output).isEqualTo(expected)
}
@Test
@ -20,8 +20,8 @@ class CryptTest {
val crypt = Crypt()
val input = 2859923929
val expect: Long = 126009121
val expected = 126009121L
val output: Long = crypt.simpleDecrypt(input)
Assertions.assertEquals(expect, output)
assertThat(output).isEqualTo(expected)
}
}