Sha256: bbe458ae3efba9e3342f0ed936846e23b16ef7695f69d4d9e646506257e7669c

Contents?: true

Size: 1.49 KB

Versions: 240

Compression:

Stored size: 1.49 KB

Contents

module NucleoTideCountTest

open NUnit.Framework

open NucleoTideCount

[<Test>]
let ``Has no nucleotides`` () =
    let strand = ""
    let expected = [ ( 'A', 0 ); ( 'T', 0 ); ( 'C', 0 ); ( 'G', 0 ) ] |> Map.ofSeq
    Assert.That(nucleotideCounts strand, Is.EqualTo(expected))
    
[<Test>]
[<Ignore("Remove to run test")>]
let ``Has no adenosine`` () =
    let strand = ""
    Assert.That(count 'A' strand, Is.EqualTo(0))
    
[<Test>]
[<Ignore("Remove to run test")>]
let ``Repetitive cytidine gets counts`` () =
    let strand = "CCCCC"
    Assert.That(count 'C' strand, Is.EqualTo(5))
    
[<Test>]
[<Ignore("Remove to run test")>]
let ``Repetitive sequence has only guanosine`` () =
    let strand = "GGGGGGGG"
    let expected = [ ( 'A', 0 ); ( 'T', 0 ); ( 'C', 0 ); ( 'G', 8 ) ] |> Map.ofSeq
    Assert.That(nucleotideCounts strand, Is.EqualTo(expected))
    
[<Test>]
[<Ignore("Remove to run test")>]
let ``Counts only thymidine`` () =
    let strand = "GGGGTAACCCGG"
    Assert.That(count 'T' strand, Is.EqualTo(1))
    
[<Test>]
[<Ignore("Remove to run test")>]
let ``Validates nucleotides`` () =
    let strand = "GGTTGG"
    Assert.Throws(fun () -> count 'X' strand |> ignore) |> ignore
    
[<Test>]
[<Ignore("Remove to run test")>]
let ``Counts all nucleotides`` () =
    let strand = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC"
    let expected = [ ( 'A', 20 ); ( 'T', 21 ); ( 'C', 12 ); ( 'G', 17 ) ] |> Map.ofSeq
    Assert.That(nucleotideCounts strand, Is.EqualTo(expected))

Version data entries

240 entries across 240 versions & 1 rubygems

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