From: gmungoc Date: Tue, 22 Aug 2017 15:03:01 +0000 (+0100) Subject: JAL-2680 remove all mappings in test teardown X-Git-Tag: Release_2_10_3b1~147 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dbb71995c8490253b2a2ac6e06e75b324e69906d;p=jalview.git JAL-2680 remove all mappings in test teardown --- diff --git a/test/jalview/io/FeaturesFileTest.java b/test/jalview/io/FeaturesFileTest.java index 3b688db..152ab84 100644 --- a/test/jalview/io/FeaturesFileTest.java +++ b/test/jalview/io/FeaturesFileTest.java @@ -34,7 +34,9 @@ import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.datamodel.features.SequenceFeatures; import jalview.gui.AlignFrame; +import jalview.gui.Desktop; import jalview.gui.JvOptionPane; +import jalview.structure.StructureSelectionManager; import java.awt.Color; import java.io.File; @@ -45,11 +47,24 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class FeaturesFileTest { + private static String simpleGffFile = "examples/testdata/simpleGff3.gff"; + + @AfterClass(alwaysRun = true) + public void tearDownAfterClass() + { + /* + * remove any sequence mappings created so they don't pollute other tests + */ + StructureSelectionManager ssm = StructureSelectionManager + .getStructureSelectionManager(Desktop.instance); + ssm.resetAll(); + } @BeforeClass(alwaysRun = true) public void setUpJvOptionPane() @@ -58,8 +73,6 @@ public class FeaturesFileTest JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); } - private static String simpleGffFile = "examples/testdata/simpleGff3.gff"; - @Test(groups = { "Functional" }) public void testParse() throws Exception {