Sha256: 6a299b823bfd57f5f81882fc2b70dc1e5c03b69748396ef918a916f0ee860d12

Contents?: true

Size: 1.11 KB

Versions: 115

Compression:

Stored size: 1.11 KB

Contents

using NUnit.Framework;

[TestFixture]
public class HammingTest
{
    [Test]
    public void No_difference_between_empty_strands()
    {
        Assert.That(Hamming.Compute("",""), Is.EqualTo(0));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void No_difference_between_identical_strands()
    {
        Assert.That(Hamming.Compute("GGACTGA","GGACTGA"), Is.EqualTo(0));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Complete_hamming_distance_in_small_strand()
    {
        Assert.That(Hamming.Compute("ACT","GGA"), Is.EqualTo(3));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Hamming_distance_is_off_by_one_strand()
    {
        Assert.That(Hamming.Compute("GGACGGATTCTG","AGGACGGATTCT"), Is.EqualTo(9));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Smalling_hamming_distance_in_middle_somewhere()
    {
        Assert.That(Hamming.Compute("GGACG","GGTCG"), Is.EqualTo(1));
    }

    [Ignore("Remove to run test")]
    [Test]
    public void Larger_distance()
    {
        Assert.That(Hamming.Compute("ACCAGGG","ACTATGG"), Is.EqualTo(2));
    }
}

Version data entries

115 entries across 115 versions & 1 rubygems

Version Path
trackler-2.0.8.14 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.13 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.12 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.11 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.10 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.9 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.8 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.7 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.6 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.5 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.4 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.3 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.2 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.8.1 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.7.0 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.6.44 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.6.43 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.6.42 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.6.41 tracks/csharp/exercises/hamming/HammingTest.cs
trackler-2.0.6.40 tracks/csharp/exercises/hamming/HammingTest.cs