Commits

Claus Rasmussen authored cec6c67d540
Trying to fix jacoco..
No tags

api/src/test/java/dk/nsp/api/auth/keyserver/models/KeyModelDTOTest.kt

Modified
29 29
30 30 package dk.nsp.api.auth.keyserver.models
31 31
32 32 import dk.nsp.testassertions.assertEquals
33 33 import dk.nsp.testassertions.assertNotNull
34 34 import org.junit.Test
35 35 import org.junit.runner.RunWith
36 36 import org.robolectric.RobolectricTestRunner
37 37 import org.robolectric.annotation.Config
38 38
39 -@Config(sdk = [26], manifest = Config.NONE)
39 +@Config(sdk = [33], manifest = Config.NONE)
40 40 @RunWith(RobolectricTestRunner::class)
41 41 class KeyModelDTOTest {
42 42
43 43 @Test
44 44 fun EncryptAndDecrypt() {
45 45 val keyModel = KeyModelDTO(
46 46 "cHIF0R2wJzDzBuiy2gkmBQ==",
47 47 "JW4ZPCWDRBU080V9",
48 48 "RWZEFF3FPWRYMG50"
49 49 )
50 50
51 51 val source = "This is the string to encryp and descrypt"
52 52 val encrypted = keyModel.encrypt(source.toByteArray())
53 53 encrypted.assertNotNull()
54 54 val decrypted = keyModel.decrypt(encrypted)
55 55
56 56 decrypted.toString().assertEquals(source)
57 57 }
58 -}
58 +}

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut