Skip to content

Commit

Permalink
fix: Added @ignore to the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DerSimeon committed Oct 14, 2024
1 parent 157270a commit 51b58c0
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
Expand All @@ -7,52 +8,67 @@ class AffineCipherTest {
@Test
fun `encode yes`() = assertEquals("xbt", AffineCipher.encode("yes", 5, 7))

@Ignore
@Test
fun `encode no`() = assertEquals("fu", AffineCipher.encode("no", 15, 18))

@Ignore
@Test
fun `encode OMG`() = assertEquals("lvz", AffineCipher.encode("OMG", 21, 3))

@Ignore
@Test
fun `encode O M G`() = assertEquals("hjp", AffineCipher.encode("O M G", 25, 47))

@Ignore
@Test
fun `encode mindblowingly`() = assertEquals("rzcwa gnxzc dgt", AffineCipher.encode("mindblowingly", 11, 15))

@Ignore
@Test
fun `encode numbers`() = assertEquals("jqgjc rw123 jqgjc rw", AffineCipher.encode("Testing,1 2 3, testing.", 3, 4))

@Ignore
@Test
fun `encode deep thought`() = assertEquals("iynia fdqfb ifje", AffineCipher.encode("Truth is fiction.", 5, 17))

@Ignore
@Test
fun `encode all letters`() = assertEquals("swxtj npvyk lruol iejdc blaxk swxmh qzglf", AffineCipher.encode("The quick brown fox jumps over the lazy dog.", 17, 33))

@Ignore
@Test
fun `encode with a not coprime to m`() {
assertFailsWith<IllegalArgumentException>("a and m must be coprime.") {
AffineCipher.encode("This is a test.", 6, 17)
}
}

@Ignore
@Test
fun `decode exercism`() = assertEquals("exercism", AffineCipher.decode("tytgn fjr", 3, 7))

@Ignore
@Test
fun `decode a sentence`() = assertEquals("anobstacleisoftenasteppingstone", AffineCipher.decode("qdwju nqcro muwhn odqun oppmd aunwd o", 19, 16))

@Ignore
@Test
fun `decode numbers`() = assertEquals("testing123testing", AffineCipher.decode("odpoz ub123 odpoz ub", 25, 7))

@Ignore
@Test
fun `decode all the letters`() = assertEquals("thequickbrownfoxjumpsoverthelazydog", AffineCipher.decode("swxtj npvyk lruol iejdc blaxk swxmh qzglf", 17, 33))

@Ignore
@Test
fun `decode with no spaces in input`() = assertEquals("thequickbrownfoxjumpsoverthelazydog", AffineCipher.decode("swxtjnpvyklruoliejdcblaxkswxmhqzglf", 17, 33))

@Ignore
@Test
fun `decode with too many spaces`() = assertEquals("jollygreengiant", AffineCipher.decode("vszzm cly yd cg qdp", 15, 16))

@Ignore
@Test
fun `decode with a not coprime to m`() {
assertFailsWith<IllegalArgumentException>("a and m must be coprime.") {
Expand Down

0 comments on commit 51b58c0

Please sign in to comment.