From d7e8ec4be2dbd9011f65697f3d1779f48a5ff2ee Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 12 Nov 2015 17:55:39 +0000 Subject: [PATCH] JAL-1965 tests for word and case insensitive matching --- test/jalview/analysis/SequenceIdMatcherTest.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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"); } + } -- 1.7.10.2