Beispiel #1
0
 public void Hamming_distance_is_off_by_one_strand()
 {
     Assert.That(Hamming.Compute("GGACGGATTCTG", "AGGACGGATTCT"), Is.EqualTo(9));
 }
Beispiel #2
0
 public void Smalling_hamming_distance_in_middle_somewhere()
 {
     Assert.That(Hamming.Compute("GGACG", "GGTCG"), Is.EqualTo(1));
 }
Beispiel #3
0
 public void No_difference_between_identical_strands()
 {
     Assert.That(Hamming.Compute("GGACTGA", "GGACTGA"), Is.EqualTo(0));
 }
Beispiel #4
0
 public void Complete_hamming_distance_in_small_strand()
 {
     Assert.That(Hamming.Compute("ACT", "GGA"), Is.EqualTo(3));
 }
Beispiel #5
0
 public void Ignores_extra_length_on_original_strand_when_longer()
 {
     Assert.That(Hamming.Compute("GACTACGGACAGGGTAGGGAAT", "GACATCGCACACC"), Is.EqualTo(5));
 }
Beispiel #6
0
 public void Strands_must_be_the_same_length_to_get_distance()
 {
     Assert.That(() => Hamming.Compute("AAACTAGGGG", "AGGCTAGCGGTAGGAC"), Throws.ArgumentException);
 }
 public void Hamming_char_length_is_different_on_dna1()
 {
     Assert.That(Hamming.Compute("GGACGGATTCTGGT", "AGGACGGATTCT"), Is.EqualTo(-1));
 }
Beispiel #8
0
 public void Complete_hamming_distance_in_small_strand()
 {
     Assert.Equal(3, Hamming.Compute("ACT", "GGA"));
 }
Beispiel #9
0
 public void No_difference_between_empty_strands()
 {
     Assert.Equal(0, Hamming.Compute("", ""));
 }
Beispiel #10
0
 public void No_difference_between_WhiteSpace_strands()
 {
     Assert.That(Hamming.Compute(" ", ""), Is.EqualTo(-1));
 }
Beispiel #11
0
 public void Larger_distance()
 {
     Assert.Equal(2, Hamming.Compute("ACCAGGG", "ACTATGG"));
 }
Beispiel #12
0
 public void Smalling_hamming_distance_in_middle_somewhere()
 {
     Assert.Equal(1, Hamming.Compute("GGACG", "GGTCG"));
 }
Beispiel #13
0
 public void Hamming_distance_is_off_by_one_strand()
 {
     Assert.Equal(9, Hamming.Compute("GGACGGATTCTG", "AGGACGGATTCT"));
 }
Beispiel #14
0
 public void Larger_distance()
 {
     Assert.That(Hamming.Compute("ACCAGGG", "ACTATGG"), Is.EqualTo(2));
 }
Beispiel #15
0
 public void Ignores_extra_length_on_other_strand_when_longer()
 {
     Assert.That(Hamming.Compute("AAACTAGGGG", "AGGCTAGCGGTAGGAC"), Is.EqualTo(3));
 }
Beispiel #16
0
 public void No_difference_between_empty_strands()
 {
     Assert.That(Hamming.Compute("", ""), Is.EqualTo(0));
 }
Beispiel #17
0
 public void No_difference_between_identical_strands()
 {
     Assert.Equal(0, Hamming.Compute("GGACTGA", "GGACTGA"));
 }