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