|
|
@@ -19,22 +19,6 @@ public class AnagramTest {
|
|
19
|
19
|
|
|
20
|
20
|
@Ignore("Remove to run test")
|
|
21
|
21
|
@Test
|
|
22
|
|
- public void testDetectSimpleAnagram() {
|
|
23
|
|
- Anagram detector = new Anagram("ant");
|
|
24
|
|
- List<String> anagram = detector.match(Arrays.asList("tan", "stand", "at"));
|
|
25
|
|
- assertThat(anagram, hasItem("tan"));
|
|
26
|
|
- assertThat(anagram.size(), is(1));
|
|
27
|
|
- }
|
|
28
|
|
-
|
|
29
|
|
- @Ignore("Remove to run test")
|
|
30
|
|
- @Test
|
|
31
|
|
- public void testDoesNotConfuseDifferentDuplicates() {
|
|
32
|
|
- Anagram detector = new Anagram("galea");
|
|
33
|
|
- assertTrue(detector.match(Collections.singletonList("eagle")).isEmpty());
|
|
34
|
|
- }
|
|
35
|
|
-
|
|
36
|
|
- @Ignore("Remove to run test")
|
|
37
|
|
- @Test
|
|
38
|
22
|
public void testDetectMultipleAnagrams() {
|
|
39
|
23
|
Anagram detector = new Anagram("master");
|
|
40
|
24
|
List<String> anagrams = detector.match(Arrays.asList("stream", "pigeon", "maters"));
|
|
|
@@ -66,15 +50,6 @@ public class AnagramTest {
|
|
66
|
50
|
|
|
67
|
51
|
@Ignore("Remove to run test")
|
|
68
|
52
|
@Test
|
|
69
|
|
- public void testIdenticalWordIsNotAnagram() {
|
|
70
|
|
- Anagram detector = new Anagram("corn");
|
|
71
|
|
- List<String> anagrams = detector.match(Arrays.asList("corn", "dark", "Corn", "rank", "CORN", "cron", "park"));
|
|
72
|
|
- assertThat(anagrams, hasItem("cron"));
|
|
73
|
|
- assertThat(anagrams.size(), is(1));
|
|
74
|
|
- }
|
|
75
|
|
-
|
|
76
|
|
- @Ignore("Remove to run test")
|
|
77
|
|
- @Test
|
|
78
|
53
|
public void testEliminateAnagramsWithSameChecksum() {
|
|
79
|
54
|
Anagram detector = new Anagram("mass");
|
|
80
|
55
|
assertTrue(detector.match(Collections.singletonList("last")).isEmpty());
|
|
|
@@ -106,13 +81,6 @@ public class AnagramTest {
|
|
106
|
81
|
|
|
107
|
82
|
@Ignore("Remove to run test")
|
|
108
|
83
|
@Test
|
|
109
|
|
- public void testWordIsNotItsOwnAnagram() {
|
|
110
|
|
- Anagram detector = new Anagram("banana");
|
|
111
|
|
- assertTrue(detector.match(Collections.singletonList("Banana")).isEmpty());
|
|
112
|
|
- }
|
|
113
|
|
-
|
|
114
|
|
- @Ignore("Remove to run test")
|
|
115
|
|
- @Test
|
|
116
|
84
|
public void testIdenticalWordRepeatedIsNotAnagram() {
|
|
117
|
85
|
Anagram detector = new Anagram("go");
|
|
118
|
86
|
assertTrue(detector.match(Collections.singletonList("go Go GO")).isEmpty());
|