From: Jim Procter Date: Wed, 25 Aug 2021 17:13:49 +0000 (+0100) Subject: JAL-3829 updated tests for 3db fetcher’s working FTS metadata X-Git-Tag: Release_2_11_2_0~39^2~39 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=266d94fa55ce42491be2552bfcf2e2b0a7901c04;p=jalview.git JAL-3829 updated tests for 3db fetcher’s working FTS metadata --- diff --git a/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java b/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java index 06e1869..9a27cf3 100644 --- a/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java +++ b/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java @@ -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)); diff --git a/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java b/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java index 1397944..dec33e3 100644 --- a/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java +++ b/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java @@ -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); +// } }