From: Jim Procter Date: Thu, 12 Nov 2015 17:55:39 +0000 (+0000) Subject: JAL-1965 tests for word and case insensitive matching X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d7e8ec4be2dbd9011f65697f3d1779f48a5ff2ee;p=jalview.git JAL-1965 tests for word and case insensitive matching --- diff --git a/test/jalview/analysis/SequenceIdMatcherTest.java b/test/jalview/analysis/SequenceIdMatcherTest.java index be2497a..a71d105 100644 --- a/test/jalview/analysis/SequenceIdMatcherTest.java +++ b/test/jalview/analysis/SequenceIdMatcherTest.java @@ -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"); } + }