JAL-1805 test envirionment separation
[jalview.git] / test / jalview / datamodel / AlignmentTest.java
index df98af9..e885733 100644 (file)
@@ -1,8 +1,9 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+
 import jalview.io.AppletFormatAdapter;
 import jalview.io.FormatAdapter;
 import jalview.util.MapList;
@@ -10,8 +11,8 @@ import jalview.util.MapList;
 import java.io.IOException;
 import java.util.Iterator;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
 /**
  * Unit tests for Alignment datamodel.
@@ -68,7 +69,7 @@ public class AlignmentTest
   protected AlignmentI loadAlignment(final String data, String format)
           throws IOException
   {
-    Alignment a = new FormatAdapter().readFile(data,
+    AlignmentI a = new FormatAdapter().readFile(data,
             AppletFormatAdapter.PASTE, format);
     a.setDataset(null);
     return a;
@@ -78,7 +79,7 @@ public class AlignmentTest
    * Read in Stockholm format test data including secondary structure
    * annotations.
    */
-  @Before
+  @BeforeMethod
   public void setUp() throws IOException
   {
     al = loadAlignment(TEST_DATA, "STH");
@@ -93,7 +94,7 @@ public class AlignmentTest
   /**
    * Test method that returns annotations that match on calcId.
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testFindAnnotation_byCalcId()
   {
     Iterable<AlignmentAnnotation> anns = al
@@ -105,7 +106,7 @@ public class AlignmentTest
     assertFalse(iter.hasNext());
   }
 
-  @Test
+  @Test(groups ={ "Functional" })
   public void testDeleteAllAnnotations_includingAutocalculated()
   {
     AlignmentAnnotation aa = new AlignmentAnnotation("Consensus",
@@ -119,7 +120,7 @@ public class AlignmentTest
     assertEquals("Not all deleted", 0, al.getAlignmentAnnotation().length);
   }
 
-  @Test
+  @Test(groups ={ "Functional" })
   public void testDeleteAllAnnotations_excludingAutocalculated()
   {
     AlignmentAnnotation aa = new AlignmentAnnotation("Consensus",
@@ -143,7 +144,7 @@ public class AlignmentTest
    * 
    * @throws IOException
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testAlignAs_dnaAsDna() throws IOException
   {
     // aligned cDNA:
@@ -175,7 +176,7 @@ public class AlignmentTest
    * 
    * @throws IOException
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testAlignAs_proteinAsCdna() throws IOException
   {
     // see also AlignmentUtilsTests
@@ -199,7 +200,7 @@ public class AlignmentTest
    * 
    * @throws IOException
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testAlignAs_cdnaAsProtein() throws IOException
   {
     /*
@@ -231,7 +232,7 @@ public class AlignmentTest
    * 
    * @throws IOException
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testAlignAs_dnaAsProtein_withIntrons() throws IOException
   {
     /*