JAL-1965 tests for word and case insensitive matching
[jalview.git] / test / jalview / analysis / SequenceIdMatcherTest.java
index be2497a..a71d105 100644 (file)
@@ -79,8 +79,21 @@ public class SequenceIdMatcherTest
 
   }
 
-  public void testContainedMatch()
+  @Test(groups = { "Functional" })
+  public void testCaseInsensitiveMatch()
+  {
+    Assert.assertNotNull(getMatcher().findIdMatch("a|complexid"),
+            "Couldn't retrieve a single case insensitive match.");
+  }
+
+  @Test(groups = { "Functional" })
+  public void testFlankingMatch()
   {
+    SequenceI[] match = getMatcher().findAllIdMatches("complexId");
+    Assert.assertNotNull(match, "Flanking matches not found.");
+    Assert.assertEquals(match.length, 6,
+            "Couldn't find all entries with IDs containing 'complexId' word match");
 
   }
+
 }