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.0.0.9 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-2.0.0.8 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-2.0.0.7 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-2.0.0.6 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-2.0.0.5 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-2.0.0.4 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-2.0.0.3 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-2.0.0.2 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-2.0.0.1 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-2.0.0.0 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.4.1 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.4.0 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.3.0 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.2.1 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.2.0 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.1.2 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.1.1 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.1.0 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.0.1 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs
trackler-1.0.0 tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs