JAL-3829 updated tests for 3db fetcher’s working FTS metadata
authorJim Procter <j.procter@dundee.ac.uk>
Wed, 25 Aug 2021 17:13:49 +0000 (18:13 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Mon, 30 Aug 2021 11:17:32 +0000 (12:17 +0100)
test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java
test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java

index 06e1869..9a27cf3 100644 (file)
@@ -71,7 +71,7 @@ public class TDBeaconsFTSRestClientTest
     Assert.assertTrue(!ftsRestClient.getAllDefaultDisplayedFTSDataColumns()
             .isEmpty());
     Assert.assertEquals(ftsRestClient
-            .getAllDefaultDisplayedFTSDataColumns().size(), 10);
+            .getAllDefaultDisplayedFTSDataColumns().size(), 11);
   }
   
   @Test(groups = { "Functional" })
@@ -85,10 +85,10 @@ public class TDBeaconsFTSRestClientTest
       Assert.assertEquals(foundIndex, -1);
       foundIndex = ftsRestClient.getPrimaryKeyColumIndex(wantedFields,
               false);
-      Assert.assertEquals(foundIndex, 0);
+      Assert.assertEquals(foundIndex, 10);
       foundIndex = ftsRestClient
               .getPrimaryKeyColumIndex(wantedFields, true);
-      Assert.assertEquals(foundIndex, 1);
+      Assert.assertEquals(foundIndex, 11);
     } catch (Exception e)
     {
       e.printStackTrace();
@@ -105,7 +105,7 @@ public class TDBeaconsFTSRestClientTest
     String actual = ftsRestClient
             .getDataColumnsFieldsAsCommaDelimitedString(wantedFields);
     Assert.assertEquals(actual,
-            "model_identifier,provider,entry_name,qmean_avg_local_score,uniprot_start,uniprot_end,resolution,coverage,model_category,created");
+            "model_identifier,provider,model_category,uniprot_start,uniprot_end,resolution,qmean_avg_local_score,coverage,created,entry_name,model_url");
   }
   
   @Test(groups = { "Functional" })
@@ -137,7 +137,7 @@ public class TDBeaconsFTSRestClientTest
     try
     {
       expectedPKColumn = ftsRestClient
-              .getDataColumnByNameOrCode("Model id");
+              .getDataColumnByNameOrCode("Url");
       Assert.assertNotNull(ftsRestClient.getPrimaryKeyColumn());
       Assert.assertEquals(ftsRestClient.getPrimaryKeyColumn(),
               expectedPKColumn);
@@ -172,7 +172,7 @@ public class TDBeaconsFTSRestClientTest
     {
       foundDataColGroup = ftsRestClient.getDataColumnGroupById("g2");
       Assert.assertNotNull(foundDataColGroup);
-      Assert.assertEquals(foundDataColGroup.getName(), "Name");
+      Assert.assertEquals(foundDataColGroup.getName(), "Quality");
     } catch (Exception e)
     {
       e.printStackTrace();
@@ -260,7 +260,7 @@ public class TDBeaconsFTSRestClientTest
     }
     try
     {
-      assertEquals(1, TDBeaconsFTSRestClient.getInstance()
+      assertEquals(4, TDBeaconsFTSRestClient.getInstance()
               .getPrimaryKeyColumIndex(wantedFields, true));
 //      assertEquals(3, TDBeaconsFTSRestClient.getInstance()
 //              .getPrimaryKeyColumIndex(wantedFields, true));
index 1397944..dec33e3 100644 (file)
@@ -57,12 +57,12 @@ public class TDBeaconsPanelTest
     String outcome = TDBeaconsFTSPanel.decodeSearchTerm("P01308");
     System.out.println(outcome);
   }
-  
-  @Test
-  public void queryTest() {
-    int outcome = TDBeaconsFTSPanel.executeParse("P01308");
-    //System.out.println("query outcome :" + outcome);
-    int expected_length = 110;
-    assertEquals(outcome, expected_length);
-  }
+//  
+//  @Test
+//  public void queryTest() {
+//    int outcome = TDBeaconsFTSPanel.executeParse("P01308");
+//    //System.out.println("query outcome :" + outcome);
+//    int expected_length = 110;
+//    assertEquals(outcome, expected_length);
+//  }
 }