JAL-4114 updated mock tests and responses for v2.0 api
[jalview.git] / test / jalview / gui / structurechooser / StructureChooserQuerySourceTest.java
index 73ba4df..16f4b7e 100644 (file)
@@ -58,6 +58,8 @@ public class StructureChooserQuerySourceTest
 
   Sequence seq, upSeq, upSeq_insulin, upSeq_r1ab;
 
+  private Sequence upSeq_fer1_maize;
+
   // same set up as for structurechooser test
 
   @BeforeMethod(alwaysRun = true)
@@ -227,6 +229,14 @@ public class StructureChooserQuerySourceTest
     upSeq_r1ab
             .addDBRef(new DBRefEntry("UNIPROT", "0", "P0DTD1", null, true));
     upSeq_r1ab.createDatasetSequence();
+    upSeq_fer1_maize = new Sequence("FER1_MAIZE",
+            "MATVLGSPRAPAFFFSSSSLRAAPAPTAVALPAAKVGIMGRSASSRRRLRAQATYNVKLITPEGE"
+                    + "VELQVPDDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDV"
+                    + "VIETHKEEELTGA");
+    upSeq_fer1_maize.setDescription("Feredoxin 1 Maize");
+    upSeq_fer1_maize
+            .addDBRef(new DBRefEntry("UNIPROT", "0", "P27787", null, true));
+    upSeq_fer1_maize.createDatasetSequence();
 
   }
 
@@ -236,6 +246,7 @@ public class StructureChooserQuerySourceTest
     seq = null;
     upSeq = null;
     upSeq_r1ab = null;
+    upSeq_fer1_maize = null;
   }
 
   @SuppressWarnings("deprecation")
@@ -409,6 +420,7 @@ public class StructureChooserQuerySourceTest
               .getSearchSummary().size());
       // NB Could have race condition here
       List<String> pdb_Queries = tdbquery.buildPDBFTSQueryFor(upResponse);
+      assertTrue(pdb_Queries.size() > 0);
       for (String pdb_Query : pdb_Queries)
       {
         assertTrue(pdb_Query.trim().length() > 0);
@@ -447,7 +459,8 @@ public class StructureChooserQuerySourceTest
   public Object[][] testUpSeqs() throws Exception
   {
     setUp();
-    return new Object[][] { { upSeq }, { upSeq_insulin }, { upSeq_r1ab } };
+    return new Object[][] { { upSeq }, { upSeq_insulin }, { upSeq_r1ab },
+        { upSeq_fer1_maize } };
   }
 
   @Test(groups = { "Functional" })