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.2.1.22 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.21 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.20 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.19 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.18 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.17 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.16 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.15 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.14 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.13 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.12 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.11 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.10 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.9 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.8 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.7 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.6 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.5 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.4 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs
trackler-2.2.1.3 tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs