123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- // This file was auto-generated based on version 1.3.0 of the canonical data.
-
- module NucleotideCountTests
-
- open FsUnit.Xunit
- open Xunit
-
- open NucleotideCount
-
- [<Fact>]
- let ``Empty strand`` () =
- let strand = ""
- let expected =
- [ ('A', 0);
- ('C', 0);
- ('G', 0);
- ('T', 0) ]
- |> Map.ofList
- |> Some
- nucleotideCounts strand |> should equal expected
-
- [<Fact>]
- let ``Can count one nucleotide in single-character input`` () =
- let strand = "G"
- let expected =
- [ ('A', 0);
- ('C', 0);
- ('G', 1);
- ('T', 0) ]
- |> Map.ofList
- |> Some
- nucleotideCounts strand |> should equal expected
-
- [<Fact>]
- let ``Strand with repeated nucleotide`` () =
- let strand = "GGGGGGG"
- let expected =
- [ ('A', 0);
- ('C', 0);
- ('G', 7);
- ('T', 0) ]
- |> Map.ofList
- |> Some
- nucleotideCounts strand |> should equal expected
-
- [<Fact>]
- let ``Strand with multiple nucleotides`` () =
- let strand = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC"
- let expected =
- [ ('A', 20);
- ('C', 12);
- ('G', 17);
- ('T', 21) ]
- |> Map.ofList
- |> Some
- nucleotideCounts strand |> should equal expected
-
- [<Fact>]
- let ``Strand with invalid nucleotides`` () =
- let strand = "AGXXACT"
- let expected = None
- nucleotideCounts strand |> should equal expected
|