Sha256: 23f6876702976f2656473d08bc7e4e9b362115fef994abc3dff60d2f5c18890f

Contents?: true

Size: 1.38 KB

Versions: 240

Compression:

Stored size: 1.38 KB

Contents

module RailFenceCipherTest

open NUnit.Framework

open RailFenceCipher

[<Test>]
let ``Encode with two rails`` () =
    let actual = encode 2 "XOXOXOXOXOXOXOXOXO"
    let expected = "XXXXXXXXXOOOOOOOOO"
    Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Encode with three rails`` () =
    let actual = encode 3 "WEAREDISCOVEREDFLEEATONCE"
    let expected = "WECRLTEERDSOEEFEAOCAIVDEN"
    Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Encode with ending in the middle`` () =
    let actual = encode 4 "EXERCISES"
    let expected = "ESXIEECSR"
    Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Decode with three rails`` () =
    let actual = decode 3 "TEITELHDVLSNHDTISEIIEA"
    let expected = "THEDEVILISINTHEDETAILS"
    Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Decode with five rails`` () =
    let actual = decode 5 "EIEXMSMESAORIWSCE"
    let expected = "EXERCISMISAWESOME"
    Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Decode with six rails`` () =
    let actual = decode 6 "133714114238148966225439541018335470986172518171757571896261"
    let expected = "112358132134558914423337761098715972584418167651094617711286"
    Assert.That(actual, Is.EqualTo(expected))

Version data entries

240 entries across 240 versions & 1 rubygems

Version Path
trackler-2.1.0.45 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.44 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.43 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.42 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.41 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.40 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.39 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.38 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.37 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.36 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.34 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.33 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.32 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.31 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.30 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.29 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.28 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.27 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.26 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.1.0.25 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs