Sha256: 8f00c71299b833db19fd8038181bf6f4ada2aeff17e5f94216e1e5fd8c3f12ef

Contents?: true

Size: 1.01 KB

Versions: 91

Compression:

Stored size: 1.01 KB

Contents

import org.scalatest.{Matchers, FunSuite}

/** @version 1.0.1 */
class RailFenceCipherTest extends FunSuite with Matchers {

  test("encode with two rails") {
    RailFenceCipher.encode("XOXOXOXOXOXOXOXOXO", 2) should be ("XXXXXXXXXOOOOOOOOO")
  }

  test("encode with three rails") {
    pending
    RailFenceCipher.encode("WEAREDISCOVEREDFLEEATONCE", 3) should be ("WECRLTEERDSOEEFEAOCAIVDEN")
  }

  test("encode with ending in the middle") {
    pending
    RailFenceCipher.encode("EXERCISES", 4) should be ("ESXIEECSR")
  }

  test("decode with three rails") {
    pending
    RailFenceCipher.decode("TEITELHDVLSNHDTISEIIEA", 3) should be ("THEDEVILISINTHEDETAILS")
  }

  test("decode with five rails") {
    pending
    RailFenceCipher.decode("EIEXMSMESAORIWSCE", 5) should be ("EXERCISMISAWESOME")
  }

  test("decode with six rails") {
    pending
    RailFenceCipher.decode("133714114238148966225439541018335470986172518171757571896261", 6) should
      be ("112358132134558914423337761098715972584418167651094617711286")
  }
}

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
trackler-2.2.1.110 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.109 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.108 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.107 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.106 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.105 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.104 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.103 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.102 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.101 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.100 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.99 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.98 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.97 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.96 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.95 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.94 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.93 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.92 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.91 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala