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

Merge pull request #454 from FridaTveit/AnagramAddIgnoreHint

anagram: add hint to @Ignore annotations
Stuart Kent 9 лет назад
Родитель
Сommit
9142dd4dd9
1 измененных файлов: 15 добавлений и 15 удалений
  1. 15
    15
      exercises/anagram/src/test/java/AnagramTest.java

+ 15
- 15
exercises/anagram/src/test/java/AnagramTest.java Просмотреть файл

16
         assertTrue(detector.match(Arrays.asList("hello", "world", "zombies", "pants")).isEmpty());
16
         assertTrue(detector.match(Arrays.asList("hello", "world", "zombies", "pants")).isEmpty());
17
     }
17
     }
18
 
18
 
19
-    @Ignore
19
+    @Ignore("Remove to run test")
20
     @Test
20
     @Test
21
     public void testDetectSimpleAnagram() {
21
     public void testDetectSimpleAnagram() {
22
         Anagram detector = new Anagram("ant");
22
         Anagram detector = new Anagram("ant");
25
         assertThat(anagram.size(), is(1));
25
         assertThat(anagram.size(), is(1));
26
     }
26
     }
27
 
27
 
28
-    @Ignore
28
+    @Ignore("Remove to run test")
29
     @Test
29
     @Test
30
     public void testDetectLongerAnagram() {
30
     public void testDetectLongerAnagram() {
31
         Anagram detector = new Anagram("listen");
31
         Anagram detector = new Anagram("listen");
33
         assertThat(anagrams, hasItem("inlets"));
33
         assertThat(anagrams, hasItem("inlets"));
34
     }
34
     }
35
 
35
 
36
-    @Ignore
36
+    @Ignore("Remove to run test")
37
     @Test
37
     @Test
38
     public void testDetectMultipleAnagrams() {
38
     public void testDetectMultipleAnagrams() {
39
         Anagram detector = new Anagram("master");
39
         Anagram detector = new Anagram("master");
41
         assertThat(anagrams, allOf(hasItem("maters"), hasItem("stream")));
41
         assertThat(anagrams, allOf(hasItem("maters"), hasItem("stream")));
42
     }
42
     }
43
 
43
 
44
-    @Ignore
44
+    @Ignore("Remove to run test")
45
     @Test
45
     @Test
46
     public void testDetectMultipleAnagramsForLongerWord() {
46
     public void testDetectMultipleAnagramsForLongerWord() {
47
         Anagram detector = new Anagram("allergy");
47
         Anagram detector = new Anagram("allergy");
49
         assertThat(anagrams, allOf(hasItem("gallery"), hasItem("largely"), hasItem("regally")));
49
         assertThat(anagrams, allOf(hasItem("gallery"), hasItem("largely"), hasItem("regally")));
50
     }
50
     }
51
 
51
 
52
-    @Ignore
52
+    @Ignore("Remove to run test")
53
     @Test
53
     @Test
54
     public void testDoesNotConfuseDifferentDuplicates() {
54
     public void testDoesNotConfuseDifferentDuplicates() {
55
         Anagram detector = new Anagram("galea");
55
         Anagram detector = new Anagram("galea");
56
         assertTrue(detector.match(Arrays.asList("eagle")).isEmpty());
56
         assertTrue(detector.match(Arrays.asList("eagle")).isEmpty());
57
     }
57
     }
58
 
58
 
59
-    @Ignore
59
+    @Ignore("Remove to run test")
60
     @Test
60
     @Test
61
     public void testIdenticalWordIsNotAnagram() {
61
     public void testIdenticalWordIsNotAnagram() {
62
         Anagram detector = new Anagram("corn");
62
         Anagram detector = new Anagram("corn");
65
         assertThat(anagrams.size(), is(1));
65
         assertThat(anagrams.size(), is(1));
66
     }
66
     }
67
 
67
 
68
-    @Ignore
68
+    @Ignore("Remove to run test")
69
     @Test
69
     @Test
70
     public void testIdenticalWordRepeatedIsNotAnagram() {
70
     public void testIdenticalWordRepeatedIsNotAnagram() {
71
         Anagram detector = new Anagram("go");
71
         Anagram detector = new Anagram("go");
72
         assertTrue(detector.match(Arrays.asList("go Go GO")).isEmpty());
72
         assertTrue(detector.match(Arrays.asList("go Go GO")).isEmpty());
73
     }
73
     }
74
 
74
 
75
-    @Ignore
75
+    @Ignore("Remove to run test")
76
     @Test
76
     @Test
77
     public void testCapitalWordIsNotOwnAnagram() {
77
     public void testCapitalWordIsNotOwnAnagram() {
78
         Anagram detector = new Anagram("BANANA");
78
         Anagram detector = new Anagram("BANANA");
79
         assertTrue(detector.match(Arrays.asList("Banana")).isEmpty());
79
         assertTrue(detector.match(Arrays.asList("Banana")).isEmpty());
80
     }
80
     }
81
 
81
 
82
-    @Ignore
82
+    @Ignore("Remove to run test")
83
     @Test
83
     @Test
84
     public void testEliminateAnagramsWithSameChecksum() {
84
     public void testEliminateAnagramsWithSameChecksum() {
85
         Anagram detector = new Anagram("mass");
85
         Anagram detector = new Anagram("mass");
86
         assertTrue(detector.match(Arrays.asList("last")).isEmpty());
86
         assertTrue(detector.match(Arrays.asList("last")).isEmpty());
87
     }
87
     }
88
 
88
 
89
-    @Ignore
89
+    @Ignore("Remove to run test")
90
     @Test
90
     @Test
91
     public void testEliminateAnagramSubsets() {
91
     public void testEliminateAnagramSubsets() {
92
         Anagram detector = new Anagram("good");
92
         Anagram detector = new Anagram("good");
93
         assertTrue(detector.match(Arrays.asList("dog", "goody")).isEmpty());
93
         assertTrue(detector.match(Arrays.asList("dog", "goody")).isEmpty());
94
     }
94
     }
95
 
95
 
96
-    @Ignore
96
+    @Ignore("Remove to run test")
97
     @Test
97
     @Test
98
     public void testCaseInsensitiveWhenSubjectStartsWithUpperCaseLetter() {
98
     public void testCaseInsensitiveWhenSubjectStartsWithUpperCaseLetter() {
99
         Anagram detector = new Anagram("Orchestra");
99
         Anagram detector = new Anagram("Orchestra");
101
         assertThat(anagrams, hasItem("carthorse"));
101
         assertThat(anagrams, hasItem("carthorse"));
102
     }
102
     }
103
 
103
 
104
-    @Ignore
104
+    @Ignore("Remove to run test")
105
     @Test
105
     @Test
106
     public void testCaseInsensitiveWhenAnagramStartsWithUpperCaseLetter() {
106
     public void testCaseInsensitiveWhenAnagramStartsWithUpperCaseLetter() {
107
         Anagram detector = new Anagram("orchestra");
107
         Anagram detector = new Anagram("orchestra");
109
         assertThat(anagrams, hasItem("Carthorse"));
109
         assertThat(anagrams, hasItem("Carthorse"));
110
     }
110
     }
111
 
111
 
112
-    @Ignore
112
+    @Ignore("Remove to run test")
113
     @Test
113
     @Test
114
     public void testCaseInsensitiveWhenBothAnagramAndSubjectStartWithUpperCaseLetter() {
114
     public void testCaseInsensitiveWhenBothAnagramAndSubjectStartWithUpperCaseLetter() {
115
         Anagram detector = new Anagram("Orchestra");
115
         Anagram detector = new Anagram("Orchestra");
117
         assertThat(anagrams, hasItem("Carthorse"));
117
         assertThat(anagrams, hasItem("Carthorse"));
118
     }
118
     }
119
 
119
 
120
-    @Ignore
120
+    @Ignore("Remove to run test")
121
     @Test
121
     @Test
122
     public void testWordIsNotItsOwnAnagram() {
122
     public void testWordIsNotItsOwnAnagram() {
123
         Anagram detector = new Anagram("banana");
123
         Anagram detector = new Anagram("banana");
124
         assertTrue(detector.match(Arrays.asList("Banana")).isEmpty());
124
         assertTrue(detector.match(Arrays.asList("Banana")).isEmpty());
125
     }
125
     }
126
 
126
 
127
-    @Ignore
127
+    @Ignore("Remove to run test")
128
     @Test
128
     @Test
129
     public void testAnagramMustUseAllLettersExactlyOnce() {
129
     public void testAnagramMustUseAllLettersExactlyOnce() {
130
         Anagram detector = new Anagram("tapper");
130
         Anagram detector = new Anagram("tapper");