X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2FPDBSequenceFetcherTest.java;h=95863e7fabfb84138ba8a51a84d1377f099749e1;hb=efa724edf32b5803396087cf7c94521e3d597836;hp=b560f01e11a712f1d511e8e358188d9e2f3d4373;hpb=a28768a635abf715690fe991326dc7e650f37049;p=jalview.git diff --git a/test/jalview/ws/PDBSequenceFetcherTest.java b/test/jalview/ws/PDBSequenceFetcherTest.java index b560f01..95863e7 100644 --- a/test/jalview/ws/PDBSequenceFetcherTest.java +++ b/test/jalview/ws/PDBSequenceFetcherTest.java @@ -25,21 +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()); @@ -60,6 +72,7 @@ public class PDBSequenceFetcherTest @Test(groups = { "Network" }, enabled = true) public void testRnaSeqRetrieve() throws Exception { + Cache.applicationProperties.setProperty("PDB_DOWNLOAD_FORMAT", "PDB"); List sps = sf.getSourceProxy("PDB"); AlignmentI response = sps.get(0).getSequenceRecords("2GIS"); assertTrue(response != null); @@ -79,16 +92,17 @@ 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); + testRetrieveProteinSeqFromPDB(); } @Test(groups = { "Network" }, enabled = true) public void testmmCifSeqRetrieve() throws Exception { - Cache.applicationProperties.setProperty("STRUCT_FROM_PDB", - Boolean.FALSE.toString()); + StructureImportSettings.setDefaultStructureFileFormat("mmCIF"); testRetrieveProteinSeqFromPDB(); }