Sha256: df484c3af094c941dec81fab3073c925319a8cf22c13b996bf96fc420eebaed3

Contents?: true

Size: 776 Bytes

Versions: 27

Compression:

Stored size: 776 Bytes

Contents

module LuhnTest

open NUnit.Framework
open Luhn
  
[<TestCase("1", ExpectedResult = false)>] // single digit strings can not be valid
[<TestCase("0", ExpectedResult = false, Ignore = "Remove to run test case")>] // a single zero is invalid
[<TestCase("046 454 286", ExpectedResult = true, Ignore = "Remove to run test case")>] // valid Canadian SIN
[<TestCase("046 454 287", ExpectedResult = false, Ignore = "Remove to run test case")>] // invalid Canadian SIN
[<TestCase("8273 1232 7352 0569", ExpectedResult = false, Ignore = "Remove to run test case")>] // invalid credit card
[<TestCase("827a 1232 7352 0569", ExpectedResult = false, Ignore = "Remove to run test case")>] // strings that contain non-digits are not valid
let ``Validate checksum`` number =
    valid number

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
trackler-2.0.6.36 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.35 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.34 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.33 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.32 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.31 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.30 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.29 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.28 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.27 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.26 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.25 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.24 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.23 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.22 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.21 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.20 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.19 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.18 tracks/fsharp/exercises/luhn/LuhnTest.fs
trackler-2.0.6.17 tracks/fsharp/exercises/luhn/LuhnTest.fs