import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import jalview.api.AlignCalcWorkerI;
import jalview.bin.Cache;
import jalview.bin.Jalview;
import jalview.datamodel.AlignedCodonFrame;
import org.testng.Assert;
import org.testng.AssertJUnit;
+import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(singleThreaded = true)
public class Jalview2xmlTests extends Jalview2xmlBase
{
+ @AfterMethod(alwaysRun = true)
+ public void tearDown()
+ {
+ Desktop.getInstance().closeAll_actionPerformed(null);
+ }
@Override
@BeforeClass(alwaysRun = true)
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/exampleFile_2_7.jar", DataSourceType.FILE);
assertNotNull(af, "Didn't read in the example file correctly.");
- assertTrue(Desktop.getAlignFrames().length == 1 + origCount,
+ assertEquals(Desktop.getAlignFrames().length,
+ 1 + origCount,
"Didn't gather the views in the example file.");
-
}
/**
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
+import java.awt.Color;
+import java.util.List;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
import jalview.api.FeatureColourI;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.viewmodel.seqfeatures.FeatureRendererModel;
import jalview.viewmodel.seqfeatures.FeatureRendererModel.FeatureSettingsBean;
-import java.awt.Color;
-import java.util.List;
-
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
/**
* Unit tests for feature colour determination, including but not limited to
* <ul>
private FeatureRendererModel fr;
- @BeforeTest(alwaysRun = true)
+ @BeforeClass(alwaysRun = true)
public void setUp()
{
// aligned column 8 is sequence position 6