JAL-3765 fix test bug/JAL-3765_Find_bugs_in_21112
authorJim Procter <jprocter@issues.jalview.org>
Tue, 20 Oct 2020 16:23:30 +0000 (17:23 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 20 Oct 2020 16:23:30 +0000 (17:23 +0100)
test/jalview/analysis/FinderTest.java

index 764c56f..1f45f70 100644 (file)
@@ -82,16 +82,6 @@ public class FinderTest
             DataSourceType.PASTE);
     av = af.getViewport();
     al = av.getAlignment();
-    
-    // JAL-3765 bug test data
-    String longSeqData = 
-            ">O80429_MAIZE/2-140 Ferredoxin\n" + 
-            "AAT---------ALSMSILR---APPPCFSSPLRLRV--AVAKPLA-APMRRQLLRAQATYNVKLITPEGEV\n" + 
-            "ELQVPDDVYILDFAEEEGIDLPFSCRAGSCSSCAGKVVSGSVDQSDQSFLNDNQVADGWVLTCAAYPTSDVV\n" + 
-            "IETHKEDDLL--\n" ;
-    af_oneseq=new FileLoader().LoadFileWaitTillLoaded(longSeqData, DataSourceType.PASTE);
-    av_oneseq = af_oneseq.getViewport();
-    al_oneseq = av_oneseq.getAlignment();
   }
 
   @AfterMethod(alwaysRun = true)
@@ -133,6 +123,19 @@ public class FinderTest
     assertEquals(matches.get(1).getEnd(), 6);
   }
 
+  @Test(groups = "Functional")
+  public void testFind_findAll()
+  {
+    /*
+     * simple JAL-3765 test
+     * single symbol should find *all* matching symbols 
+     */
+    Finder f = new Finder(av);
+    f.findAll("M", false,false,false);
+    SearchResultsI sr = f.getSearchResults();
+    assertEquals(sr.getCount(),5);
+    
+  }
   /**
    * Test for (undocumented) find residue by position
    */