JAL-1805 modified test setup's so the are ran for groups which requires them
[jalview.git] / test / jalview / analysis / AlignmentAnnotationUtilsTest.java
index 34d2f32..b68842a 100644 (file)
@@ -3,8 +3,13 @@ package jalview.analysis;
 import static org.testng.AssertJUnit.assertEquals;
 import static org.testng.AssertJUnit.assertFalse;
 import static org.testng.AssertJUnit.assertTrue;
-import org.testng.annotations.Test;
-import org.testng.annotations.BeforeMethod;
+
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.SequenceI;
+import jalview.io.AppletFormatAdapter;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.BitSet;
@@ -13,11 +18,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import jalview.datamodel.AlignmentAnnotation;
-import jalview.datamodel.AlignmentI;
-import jalview.datamodel.Annotation;
-import jalview.datamodel.SequenceI;
-import jalview.io.AppletFormatAdapter;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
 public class AlignmentAnnotationUtilsTest
 {
@@ -43,7 +45,7 @@ public class AlignmentAnnotationUtilsTest
   /**
    * Test method that converts a (possibly null) array to a list.
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testAsList()
   {
     // null array
@@ -116,7 +118,7 @@ public class AlignmentAnnotationUtilsTest
    * 
    * @throws IOException
    */
-  @BeforeMethod
+ @BeforeMethod(alwaysRun = true)
   public void setUp() throws IOException
   {
     alignment = new jalview.io.FormatAdapter().readFile(TEST_DATA,
@@ -141,7 +143,7 @@ public class AlignmentAnnotationUtilsTest
   /**
    * Test a mixture of show/hidden annotations in/outside selection group.
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testGetShownHiddenTypes_forSelectionGroup()
   {
     Map<String, List<List<String>>> shownTypes = new HashMap<String, List<List<String>>>();
@@ -220,7 +222,7 @@ public class AlignmentAnnotationUtilsTest
    * Test case where there are 'grouped' annotations, visible and hidden, within
    * and without the selection group.
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testGetShownHiddenTypes_withGraphGroups()
   {
     final int GROUP_3 = 3;
@@ -346,7 +348,7 @@ public class AlignmentAnnotationUtilsTest
   /**
    * Test method that determines visible graph groups.
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testGetVisibleGraphGroups()
   {
     AlignmentAnnotation[] anns = alignment.getAlignmentAnnotation();
@@ -393,7 +395,7 @@ public class AlignmentAnnotationUtilsTest
    * Test for case where no sequence is selected. Shouldn't normally arise but
    * check it handles it gracefully.
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testGetShownHiddenTypes_noSequenceSelected()
   {
     Map<String, List<List<String>>> shownTypes = new HashMap<String, List<List<String>>>();