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