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
{
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[]
assertTrue(Arrays.equals(sortedThings, things));
}
- @Test
+ @Test(groups ={ "Functional" })
public void testSort_byFloatValues()
{
float[] values = new float[]
assertTrue(Arrays.equals(sortedThings, things));
}
- @Test
+ @Test(groups ={ "Functional" })
public void testSort_byDoubleValues()
{
double[] values = new double[]
/**
* Sort by String is descending order, case-sensitive
*/
- @Test
+ @Test(groups ={ "Functional" })
public void testSort_byStringValues()
{
String[] values = new String[]
/**
* 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[]
* 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];