Browse Source

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 years ago
parent
commit
0191e43e9e
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      exercises/hamming/src/test/java/HammingTest.java

+ 4
- 4
exercises/hamming/src/test/java/HammingTest.java View File

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