Sha256: 707e5c142c8b51cc043c5885fadb6b6767ff1f1e761fafbc34f7374f634802b1
Contents?: true
Size: 1.91 KB
Versions: 39
Compression:
Stored size: 1.91 KB
Contents
// This file was auto-generated based on version 2.2.0 of the canonical data. module IsbnVerifierTest open FsUnit.Xunit open Xunit open IsbnVerifier [<Fact>] let ``Valid isbn number`` () = isValid "3-598-21508-8" |> should equal true [<Fact(Skip = "Remove to run test")>] let ``Invalid isbn check digit`` () = isValid "3-598-21508-9" |> should equal false [<Fact(Skip = "Remove to run test")>] let ``Valid isbn number with a check digit of 10`` () = isValid "3-598-21507-X" |> should equal true [<Fact(Skip = "Remove to run test")>] let ``Check digit is a character other than X`` () = isValid "3-598-21507-A" |> should equal false [<Fact(Skip = "Remove to run test")>] let ``Invalid character in isbn`` () = isValid "3-598-2K507-0" |> should equal false [<Fact(Skip = "Remove to run test")>] let ``X is only valid as a check digit`` () = isValid "3-598-2X507-9" |> should equal false [<Fact(Skip = "Remove to run test")>] let ``Valid isbn without separating dashes`` () = isValid "3598215088" |> should equal true [<Fact(Skip = "Remove to run test")>] let ``Isbn without separating dashes and X as check digit`` () = isValid "359821507X" |> should equal true [<Fact(Skip = "Remove to run test")>] let ``Isbn without check digit and dashes`` () = isValid "359821507" |> should equal false [<Fact(Skip = "Remove to run test")>] let ``Too long isbn and no dashes`` () = isValid "3598215078X" |> should equal false [<Fact(Skip = "Remove to run test")>] let ``Isbn without check digit`` () = isValid "3-598-21507" |> should equal false [<Fact(Skip = "Remove to run test")>] let ``Too long isbn`` () = isValid "3-598-21507-XX" |> should equal false [<Fact(Skip = "Remove to run test")>] let ``Check digit of X should not be used for 0`` () = isValid "3-598-21515-X" |> should equal false [<Fact(Skip = "Remove to run test")>] let ``Empty isbn`` () = isValid "" |> should equal false
Version data entries
39 entries across 39 versions & 1 rubygems