Пример #1
0
 public void Long_identical_strands()
 {
     Assert.Equal(0, Hamming.Distance("GGACTGA", "GGACTGA"));
 }
Пример #2
0
 public void Disallow_second_strand_longer()
 {
     Assert.Throws <ArgumentException>(() => Hamming.Distance("ATA", "AGTG"));
 }
Пример #3
0
 public void Identical_strands()
 {
     Assert.Equal(0, Hamming.Distance("A", "A"));
 }
Пример #4
0
 public void null_strands()
 {
     Assert.Throws <ArgumentException>(() => Hamming.Distance(null, null));
 }
Пример #5
0
 public void Disallow_first_strand_longer()
 {
     Assert.Throws <ArgumentException>(() => Hamming.Distance("AATG", "AAA"));
 }
Пример #6
0
 public void Small_distance_in_small_strands()
 {
     Assert.Equal(1, Hamming.Distance("AT", "CT"));
 }
Пример #7
0
 public void Small_distance_in_long_strands()
 {
     Assert.Equal(2, Hamming.Distance("ACCAGGG", "ACTATGG"));
 }
Пример #8
0
 public void Disallow_right_empty_strand()
 {
     Assert.Throws <ArgumentException>(() => Hamming.Distance("G", ""));
 }
Пример #9
0
 public void Same_nucleotides_in_different_positions()
 {
     Assert.Equal(2, Hamming.Distance("TAG", "GAT"));
 }
Пример #10
0
 public void Single_letter_different_strands()
 {
     Assert.Equal(1, Hamming.Distance("G", "T"));
 }
Пример #11
0
 public void Long_different_strands()
 {
     Assert.Equal(9, Hamming.Distance("GGACGGATTCTG", "AGGACGGATTCT"));
 }
Пример #12
0
 public void Single_letter_identical_strands()
 {
     Assert.Equal(0, Hamming.Distance("A", "A"));
 }
Пример #13
0
 public void Null_strands()
 {
     Assert.Equal(0, Hamming.Distance(null, null));
 }
Пример #14
0
    public void Long_Strand()
    {
        string strand = new string(Enumerable.Repeat('A', 1_000_000_000).ToArray());

        Assert.Equal(0, Hamming.Distance(strand, strand));
    }
Пример #15
0
 public void Complete_distance_in_single_nucleotide_strands()
 {
     Assert.Equal(1, Hamming.Distance("A", "G"));
 }
Пример #16
0
 public void Large_distance()
 {
     Assert.Equal(4, Hamming.Distance("GATACA", "GCATAA"));
 }
Пример #17
0
 public void Complete_distance_in_small_strands()
 {
     Assert.Equal(2, Hamming.Distance("AG", "CT"));
 }
Пример #18
0
 public void Empty_strands()
 {
     Assert.Equal(0, Hamming.Distance("", ""));
 }
Пример #19
0
 public void Small_distance()
 {
     Assert.Equal(1, Hamming.Distance("GGACG", "GGTCG"));
 }
Пример #20
0
 public void Large_distance_in_off_by_one_strand()
 {
     Assert.Equal(9, Hamming.Distance("GGACGGATTCTG", "AGGACGGATTCT"));
 }
Пример #21
0
 public void Non_unique_character_in_first_strand()
 {
     Assert.Equal(1, Hamming.Distance("AAG", "AAA"));
 }
Пример #22
0
 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));
 }