X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2FPDBSequenceFetcherTest.java;h=95863e7fabfb84138ba8a51a84d1377f099749e1;hb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;hp=fda01983927f8db5b407ee161a07a03382fcb250;hpb=82a6c8e2e25b7534168b68b2c89b9cf195f815a5;p=jalview.git diff --git a/test/jalview/ws/PDBSequenceFetcherTest.java b/test/jalview/ws/PDBSequenceFetcherTest.java index fda0198..95863e7 100644 --- a/test/jalview/ws/PDBSequenceFetcherTest.java +++ b/test/jalview/ws/PDBSequenceFetcherTest.java @@ -25,23 +25,33 @@ import static org.testng.AssertJUnit.assertTrue; import jalview.bin.Cache; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; +import jalview.gui.JvOptionPane; import jalview.structure.StructureImportSettings; import jalview.structure.StructureImportSettings.StructureParser; import jalview.ws.seqfetcher.DbSourceProxy; import java.util.List; +import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class PDBSequenceFetcherTest { + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + SequenceFetcher sf; @BeforeMethod(alwaysRun = true) public void setUp() throws Exception { + Cache.loadProperties("test/jalview/io/testProps.jvprops"); // ensure 'add annotation from structure' is selected Cache.applicationProperties.setProperty("STRUCT_FROM_PDB", Boolean.TRUE.toString()); @@ -62,10 +72,7 @@ public class PDBSequenceFetcherTest @Test(groups = { "Network" }, enabled = true) public void testRnaSeqRetrieve() throws Exception { - Cache.applicationProperties.setProperty("STRUCT_FROM_PDB", - Boolean.TRUE.toString()); - Cache.applicationProperties.setProperty("DEFAULT_STRUCTURE_FORMAT", - "PDB"); + Cache.applicationProperties.setProperty("PDB_DOWNLOAD_FORMAT", "PDB"); List sps = sf.getSourceProxy("PDB"); AlignmentI response = sps.get(0).getSequenceRecords("2GIS"); assertTrue(response != null); @@ -85,8 +92,6 @@ public class PDBSequenceFetcherTest @Test(groups = { "Network" }, enabled = true) public void testPdbSeqRetrieve() throws Exception { - Cache.applicationProperties.setProperty("STRUCT_FROM_PDB", - Boolean.TRUE.toString()); StructureImportSettings.setDefaultStructureFileFormat("PDB"); StructureImportSettings .setDefaultPDBFileParser(StructureParser.JALVIEW_PARSER); @@ -97,8 +102,6 @@ public class PDBSequenceFetcherTest @Test(groups = { "Network" }, enabled = true) public void testmmCifSeqRetrieve() throws Exception { - Cache.applicationProperties.setProperty("STRUCT_FROM_PDB", - Boolean.TRUE.toString()); StructureImportSettings.setDefaultStructureFileFormat("mmCIF"); testRetrieveProteinSeqFromPDB(); }