JAL-4041 failing tests to verify we can resolve mixture of 3d-beacons and non-3d...
[jalview.git] / test / jalview / gui / structurechooser / StructureChooserQuerySourceTest.java
index 73ba4df..39ca0f6 100644 (file)
@@ -58,6 +58,10 @@ public class StructureChooserQuerySourceTest
 
   Sequence seq, upSeq, upSeq_insulin, upSeq_r1ab;
 
+  private Sequence upSeq_fer1_maize;
+
+  private Sequence noUpSeq_fer1_maize;
+
   // same set up as for structurechooser test
 
   @BeforeMethod(alwaysRun = true)
@@ -227,6 +231,17 @@ 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();
+    noUpSeq_fer1_maize = new Sequence("O80429_MAIZE","MAATALSMSILRAPPPCFSSPLRLRVAVAKPLAAPMRRQLLRAQATYNVKLITPEGEVELQVPDDVYILDFAEEEGIDLPFSCRAGSCSSCAGKVVSGSVDQSDQSFLNDNQVADGWVLTCAAYPTSDVVIETHKEDDLL");
+    noUpSeq_fer1_maize.setDescription("Feredoxin from a Maize");
+    noUpSeq_fer1_maize.createDatasetSequence();
 
   }
 
@@ -236,11 +251,13 @@ public class StructureChooserQuerySourceTest
     seq = null;
     upSeq = null;
     upSeq_r1ab = null;
+    upSeq_fer1_maize = null;
+    noUpSeq_fer1_maize = null;
+
   }
 
   @SuppressWarnings("deprecation")
-  @Test(groups =
-  { "Functional" })
+  @Test(groups = { "Functional" })
   public void buildPDBQueryTest()
   {
     System.out.println("seq >>>> " + seq);
@@ -288,8 +305,7 @@ public class StructureChooserQuerySourceTest
   }
 
   @SuppressWarnings("deprecation")
-  @Test(groups =
-  { "Functional" })
+  @Test(groups = { "Functional" })
   public void buildThreeDBQueryTest()
   {
     System.out.println("seq >>>> " + upSeq);
@@ -409,6 +425,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);
@@ -442,12 +459,22 @@ public class StructureChooserQuerySourceTest
             { testUpSeq });
 
   }
+  
+  @Test
+  public void testTdbWithNoUpSeq()
+  {
+    // verify that a 
+    ThreeDBStructureChooserQuerySource tdbquery = new ThreeDBStructureChooserQuerySource();
+
+    Assert.fail("Not yet implemented.");
+  }
 
   @DataProvider(name = "testUpSeqs")
   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 }, {noUpSeq_fer1_maize }};
   }
 
   @Test(groups = { "Functional" })