X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Febi%2FEBIFetchClientTest.java;h=c55996631d001180ba2d57bdd56cbb864ac4c09a;hb=6cb920bb7a7f285a165cd34b3429dabba71f7518;hp=e323a0d7891e906b101af69574b69987d13920f3;hpb=604cbee405a837565ba1a74aa9bddd62aed685ab;p=jalview.git diff --git a/test/jalview/ws/ebi/EBIFetchClientTest.java b/test/jalview/ws/ebi/EBIFetchClientTest.java index e323a0d..c559966 100644 --- a/test/jalview/ws/ebi/EBIFetchClientTest.java +++ b/test/jalview/ws/ebi/EBIFetchClientTest.java @@ -23,10 +23,21 @@ package jalview.ws.ebi; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertNull; +import jalview.gui.JvOptionPane; + +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class EBIFetchClientTest { + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + /** * Test method that constructs URL to fetch from */ @@ -36,33 +47,26 @@ public class EBIFetchClientTest /* * EMBL */ - assertEquals("http://www.ebi.ac.uk/ena/data/view/x53838&display=xml", + assertEquals("https://www.ebi.ac.uk/ena/data/view/x53838&display=xml", EBIFetchClient.buildUrl("X53838", "EMBL", "display=xml")); /* * EMBLCDS */ - assertEquals("http://www.ebi.ac.uk/ena/data/view/caa37824&display=xml", + assertEquals("https://www.ebi.ac.uk/ena/data/view/caa37824&display=xml", EBIFetchClient.buildUrl("CAA37824", "EMBL", "display=xml")); /* - * Uniprot - */ - assertEquals( - "http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/uniprot/p00340/uniprotxml", - EBIFetchClient.buildUrl("P00340", "UNIPROT", "uniprotxml")); - - /* * PDB / pdb */ - assertEquals("http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/pdb/3a6s/pdb", + assertEquals("https://www.ebi.ac.uk/Tools/dbfetch/dbfetch/pdb/3a6s/pdb", EBIFetchClient.buildUrl("3A6S", "PDB", "pdb")); /* * PDB / mmCIF */ assertEquals( - "http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/pdb/3a6s/mmCIF", + "https://www.ebi.ac.uk/Tools/dbfetch/dbfetch/pdb/3a6s/mmCIF", EBIFetchClient.buildUrl("3A6S", "PDB", "mmCIF")); }