public void Long_identical_strands() { Assert.Equal(0, Hamming.Distance("GGACTGA", "GGACTGA")); }
public void Disallow_second_strand_longer() { Assert.Throws <ArgumentException>(() => Hamming.Distance("ATA", "AGTG")); }
public void Identical_strands() { Assert.Equal(0, Hamming.Distance("A", "A")); }
public void null_strands() { Assert.Throws <ArgumentException>(() => Hamming.Distance(null, null)); }
public void Disallow_first_strand_longer() { Assert.Throws <ArgumentException>(() => Hamming.Distance("AATG", "AAA")); }
public void Small_distance_in_small_strands() { Assert.Equal(1, Hamming.Distance("AT", "CT")); }
public void Small_distance_in_long_strands() { Assert.Equal(2, Hamming.Distance("ACCAGGG", "ACTATGG")); }
public void Disallow_right_empty_strand() { Assert.Throws <ArgumentException>(() => Hamming.Distance("G", "")); }
public void Same_nucleotides_in_different_positions() { Assert.Equal(2, Hamming.Distance("TAG", "GAT")); }
public void Single_letter_different_strands() { Assert.Equal(1, Hamming.Distance("G", "T")); }
public void Long_different_strands() { Assert.Equal(9, Hamming.Distance("GGACGGATTCTG", "AGGACGGATTCT")); }
public void Single_letter_identical_strands() { Assert.Equal(0, Hamming.Distance("A", "A")); }
public void Null_strands() { Assert.Equal(0, Hamming.Distance(null, null)); }
public void Long_Strand() { string strand = new string(Enumerable.Repeat('A', 1_000_000_000).ToArray()); Assert.Equal(0, Hamming.Distance(strand, strand)); }
public void Complete_distance_in_single_nucleotide_strands() { Assert.Equal(1, Hamming.Distance("A", "G")); }
public void Large_distance() { Assert.Equal(4, Hamming.Distance("GATACA", "GCATAA")); }
public void Complete_distance_in_small_strands() { Assert.Equal(2, Hamming.Distance("AG", "CT")); }
public void Empty_strands() { Assert.Equal(0, Hamming.Distance("", "")); }
public void Small_distance() { Assert.Equal(1, Hamming.Distance("GGACG", "GGTCG")); }
public void Large_distance_in_off_by_one_strand() { Assert.Equal(9, Hamming.Distance("GGACGGATTCTG", "AGGACGGATTCT")); }
public void Non_unique_character_in_first_strand() { Assert.Equal(1, Hamming.Distance("AAG", "AAA")); }
public void StaticTests(string a, string b, int expected) { Assert.AreEqual(expected, Hamming.Distance(a, b), string.Format("Expected hamming distance of '{0}' and '{1}' to be {2}", a, b, expected)); }