Просмотр исходного кода

hamming: make test names consistent [Fix #304]

*Remove mention of "complete"

*Fix spelling mistake in second test

*Add throws Exception to methods that throw exceptions
MichaelSpets 9 лет назад
Родитель
Сommit
0191e43e9e
1 измененных файлов: 4 добавлений и 4 удалений
  1. 4
    4
      exercises/hamming/src/test/java/HammingTest.java

+ 4
- 4
exercises/hamming/src/test/java/HammingTest.java Просмотреть файл

@@ -19,13 +19,13 @@ public class HammingTest {
19 19
 
20 20
     @Ignore
21 21
     @Test
22
-    public void testCompleteHammingDistanceOfForSingleNucleotideStrand() {
22
+    public void testHammingDistanceForSingleNucleotideStrand() {
23 23
         assertThat(Hamming.compute("A", "G"), is(1));
24 24
     }
25 25
 
26 26
     @Ignore
27 27
     @Test
28
-    public void testCompleteHammingDistanceForSmallStrand() {
28
+    public void testHammingDistanceForSmallStrand() {
29 29
         assertThat(Hamming.compute("AG", "CT"), is(2)); 
30 30
     }
31 31
 
@@ -43,14 +43,14 @@ public class HammingTest {
43 43
 
44 44
     @Ignore
45 45
     @Test
46
-    public void testValidatesFirstStrandNotLonger() {
46
+    public void testValidatesFirstStrandNotLonger() throws IllegalArgumentException {
47 47
         thrown.expect(IllegalArgumentException.class);
48 48
         Hamming.compute("AAAG", "AAA");                
49 49
     }
50 50
 
51 51
     @Ignore
52 52
     @Test
53
-    public void testValidatesOtherStrandNotLonger() {
53
+    public void testValidatesOtherStrandNotLonger() throws IllegalArgumentException {
54 54
         thrown.expect(IllegalArgumentException.class);
55 55
         Hamming.compute("AAA", "AAAG");
56 56
     }