X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=test%2Fjalview%2Ffts%2Fthreedbeacons%2FTDBeaconsFTSRestClientTest.java;fp=test%2Fjalview%2Ffts%2Fthreedbeacons%2FTDBeaconsFTSRestClientTest.java;h=c37058a5fada2ffe3b98dafda0c4c29d80dd705b;hp=aaf91efeb19210f517d4d74ec266181753726dad;hb=49702354dac6b1b590030070690c0737d31e3766;hpb=da11f432f67f80f1848d75f862495e5e9dd9076b diff --git a/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java b/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java index aaf91ef..c37058a 100644 --- a/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java +++ b/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java @@ -300,7 +300,8 @@ public class TDBeaconsFTSRestClientTest private static String[][] mocks = { { "P38398.json", null }, { "P01308.json", null }, - { "P0DTD1.json", null } + { "P0DTD1.json", null }, + { "P27787.json", null } // , { "P0DTD3.json", "{}" } actually results in 404, but {} is in body }; @@ -318,6 +319,9 @@ public class TDBeaconsFTSRestClientTest mocks[2][1] = PDBFTSRestClientTest.readJsonStringFromFile( "test/jalview/fts/threedbeacons/p0dtd1_tdb_fts_query_resp.txt"); + mocks[3][1] = PDBFTSRestClientTest.readJsonStringFromFile( + "test/jalview/fts/threedbeacons/p27787_tdb_fts_query_resp.txt"); + } catch (IOException e) { Assert.fail("Couldn't read mock response data", e); @@ -360,6 +364,9 @@ public class TDBeaconsFTSRestClientTest URL tdb_req = new URL(prod_url + mockRequest); byte[] resp = tdb_req.openStream().readAllBytes(); String tresp = new String(resp, StandardCharsets.UTF_8); + // this simple test fails for responses containing multi-chain structures - + // since chain order in the json elements is arbitrary and varies between + // queries. assertEquals(_mockResponse.trim(), tresp.trim()); }