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.50 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.49 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.48 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.47 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.46 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.45 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.44 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.43 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.42 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.41 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.40 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.39 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.38 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.37 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.36 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.35 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.34 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.33 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.32 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala
trackler-2.2.1.31 tracks/scala/exercises/rail-fence-cipher/src/test/scala/RailFenceCipherTest.scala