X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2FMCview%2FPDBfileTest.java;h=c07c62e0f19550d2ee53ece8870bd9fd9d4ef015;hb=refs%2Fheads%2Ffeature%2FJAL-3180colourAnnotationMenu;hp=a0b69fd7bdb7de9866ee3ceb4353855ba9d0689b;hpb=db93a1adcbe0a4eaaf06e0a70ade0d6c5c1961c3;p=jalview.git diff --git a/test/MCview/PDBfileTest.java b/test/MCview/PDBfileTest.java index a0b69fd..c07c62e 100644 --- a/test/MCview/PDBfileTest.java +++ b/test/MCview/PDBfileTest.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -33,17 +33,27 @@ import jalview.datamodel.AlignmentI; import jalview.datamodel.PDBEntry; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceI; -import jalview.io.AppletFormatAdapter; +import jalview.gui.JvOptionPane; +import jalview.io.DataSourceType; import jalview.structure.StructureImportSettings; import java.io.IOException; import java.util.List; +import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class PDBfileTest { + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + @Test(groups = { "Functional" }) public void testIsRna() { @@ -73,7 +83,7 @@ public class PDBfileTest * Constructor with file path performs parse() */ PDBfile pf = new PDBfile(false, false, false, "examples/3W5V.pdb", - AppletFormatAdapter.FILE); + DataSourceType.FILE); assertEquals("3W5V", pf.getId()); // verify no alignment annotations created @@ -149,7 +159,7 @@ public class PDBfileTest public void testParse_withAnnotations_noSS() throws IOException { PDBfile pf = new PDBfile(true, false, false, "examples/3W5V.pdb", - AppletFormatAdapter.FILE); + DataSourceType.FILE); AlignmentAnnotation[] anns = getAlignmentAnnotations(pf); assertEquals(4, anns.length); @@ -207,7 +217,7 @@ public class PDBfileTest public void testParse_withJmol_noAnnotations() throws IOException { PDBfile pf = new PDBfile(false, true, false, "examples/3W5V.pdb", - AppletFormatAdapter.FILE); + DataSourceType.FILE); /* * alignment annotations _are_ created anyway (in @@ -237,7 +247,7 @@ public class PDBfileTest throws IOException { PDBfile pf = new PDBfile(true, true, false, "examples/3W5V.pdb", - AppletFormatAdapter.FILE); + DataSourceType.FILE); /* * Alignment annotations for TempFactor, SecStruct, per sequence (chain) @@ -295,7 +305,7 @@ public class PDBfileTest // TODO requires a mock for Annotate3D processing // and/or run as an integration test PDBfile pf = new PDBfile(true, true, true, "examples/2GIS.pdb", - AppletFormatAdapter.FILE); + DataSourceType.FILE); } /** @@ -311,8 +321,6 @@ public class PDBfileTest return al.getAlignmentAnnotation(); } - // @formatter:on - @BeforeMethod(alwaysRun = true) public void setUp() {