JAL-1965 tests for word and case insensitive matching
authorJim Procter <jprocter@issues.jalview.org>
Thu, 12 Nov 2015 17:55:39 +0000 (17:55 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 12 Nov 2015 17:55:39 +0000 (17:55 +0000)
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");
 
   }
+
 }