JAL-3829 use sequence dependent constructor for structure chooser query engine testing
authorJim Procter <j.procter@dundee.ac.uk>
Fri, 3 Sep 2021 17:42:42 +0000 (18:42 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Fri, 3 Sep 2021 17:42:57 +0000 (18:42 +0100)
test/jalview/gui/StructureChooserTest.java

index c187c60..f3c5ed8 100644 (file)
@@ -32,6 +32,7 @@ import jalview.datamodel.SequenceI;
 import jalview.fts.api.FTSData;
 import jalview.gui.structurechooser.PDBStructureChooserQuerySource;
 import jalview.gui.structurechooser.StructureChooserQuerySource;
+import jalview.gui.structurechooser.ThreeDBStructureChooserQuerySource;
 import jalview.jbgui.FilterOption;
 import jalview.ws.params.InvalidArgumentException;
 
@@ -90,7 +91,9 @@ public class StructureChooserTest
   public void buildQueryTest()
   {
     System.out.println("seq >>>> " + seq);
-    StructureChooserQuerySource scquery = StructureChooserQuerySource.getPDBfts();
+    
+    StructureChooserQuerySource scquery = StructureChooserQuerySource.getQuerySourceFor(new SequenceI[] { seq});
+    assertTrue(scquery instanceof PDBStructureChooserQuerySource);
     String query = scquery.buildQuery(seq);
     assertEquals("pdb_id:1tim", query);
     seq.getAllPDBEntries().clear();