JAL-1805 test envirionment separation
[jalview.git] / test / jalview / util / QuickSortTest.java
index 2293163..fac463a 100644 (file)
@@ -1,13 +1,12 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.util.Arrays;
 
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
 public class QuickSortTest
 {
@@ -24,14 +23,14 @@ public class QuickSortTest
   private final Object[] sortedThings = new Object[]
   { c4, c2, c1, c3 };
 
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     things = new Object[]
     { c1, c2, c3, c4 };
   }
 
-  @Test
+  @Test(groups ={ "Functional" })
   public void testSort_byIntValues()
   {
     int[] values = new int[]
@@ -42,7 +41,7 @@ public class QuickSortTest
     assertTrue(Arrays.equals(sortedThings, things));
   }
 
-  @Test
+  @Test(groups ={ "Functional" })
   public void testSort_byFloatValues()
   {
     float[] values = new float[]
@@ -53,7 +52,7 @@ public class QuickSortTest
     assertTrue(Arrays.equals(sortedThings, things));
   }
 
-  @Test
+  @Test(groups ={ "Functional" })
   public void testSort_byDoubleValues()
   {
     double[] values = new double[]
@@ -67,7 +66,7 @@ public class QuickSortTest
   /**
    * Sort by String is descending order, case-sensitive
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testSort_byStringValues()
   {
     String[] values = new String[]
@@ -82,8 +81,8 @@ public class QuickSortTest
   /**
    * Test whether sort is stable i.e. equal values retain their mutual ordering.
    */
-  @Test
-  @Ignore
+  @Test(groups =
+  { "Functional" }, enabled = false)
   public void testSort_withDuplicates()
   {
     int[] values = new int[]
@@ -101,7 +100,7 @@ public class QuickSortTest
    * Test that exercises sort with a mostly zero-valued sortby array. May be of
    * interest to check the sort algorithm is efficient.
    */
-  @Test
+  @Test(groups ={ "Functional" })
   public void testSort_MostlyZeroValues()
   {
     char[] residues = new char[64];