Sha256: 4a60a880732678fd32a3e4968e63b61120f07c434f4e6b39a43183c9e1556854

Contents?: true

Size: 1.81 KB

Versions: 28

Compression:

Stored size: 1.81 KB

Contents

// This file was auto-generated based on version 1.3.0 of the canonical data.

using Xunit;
using System.Collections.Generic;

public class NucleotideCountTest
{
    [Fact]
    public void Empty_strand()
    {
        var sut = new NucleotideCount("");
        var expected = new Dictionary<char, int>
        {
            ['A'] = 0,
            ['C'] = 0,
            ['G'] = 0,
            ['T'] = 0
        };
        Assert.Equal(expected, sut.NucleotideCounts);
    }

    [Fact(Skip = "Remove to run test")]
    public void Can_count_one_nucleotide_in_single_character_input()
    {
        var sut = new NucleotideCount("G");
        var expected = new Dictionary<char, int>
        {
            ['A'] = 0,
            ['C'] = 0,
            ['G'] = 1,
            ['T'] = 0
        };
        Assert.Equal(expected, sut.NucleotideCounts);
    }

    [Fact(Skip = "Remove to run test")]
    public void Strand_with_repeated_nucleotide()
    {
        var sut = new NucleotideCount("GGGGGGG");
        var expected = new Dictionary<char, int>
        {
            ['A'] = 0,
            ['C'] = 0,
            ['G'] = 7,
            ['T'] = 0
        };
        Assert.Equal(expected, sut.NucleotideCounts);
    }

    [Fact(Skip = "Remove to run test")]
    public void Strand_with_multiple_nucleotides()
    {
        var sut = new NucleotideCount("AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC");
        var expected = new Dictionary<char, int>
        {
            ['A'] = 20,
            ['C'] = 12,
            ['G'] = 17,
            ['T'] = 21
        };
        Assert.Equal(expected, sut.NucleotideCounts);
    }

    [Fact(Skip = "Remove to run test")]
    public void Strand_with_invalid_nucleotides()
    {
        Assert.Throws<InvalidNucleotideException>(() => new NucleotideCount("AGXXACT"));
    }
}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.179 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.178 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.177 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.176 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.175 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.174 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.173 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.172 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.171 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.170 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.169 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.167 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.166 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.165 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.164 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.163 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.162 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.161 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs
trackler-2.2.1.160 tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs