import java.util.Arrays;
import java.util.List;
-import junit.extensions.PA;
-
import org.testng.annotations.Test;
+import junit.extensions.PA;
+
public class AlignmentSorterTest
{
@Test(groups = "Functional")
/*
* sort with no score features does nothing
*/
- PA.setValue(AlignmentSorter.class, "sortByFeatureCriteria", null);
+ AlignmentSorter sorter = (AlignmentSorter) PA
+ .invokeMethod(AlignmentSorter.class, "getInstance()",
+ new Object[] {});
+ PA.setValue(sorter, "sortByFeatureCriteria", null);
AlignmentSorter.sortByFeature(null, null, 0, al.getWidth(), al,
AlignmentSorter.FEATURE_SCORE);
* sort by ascending score, no filter on feature type or group
* NB sort order for the same feature set (none) gets toggled, so descending
*/
- PA.setValue(AlignmentSorter.class, "sortByFeatureAscending", true);
+ PA.setValue(sorter, "sortByFeatureAscending", true);
AlignmentSorter.sortByFeature(null, null, 0, al.getWidth(), al,
AlignmentSorter.FEATURE_SCORE);
assertSame(al.getSequenceAt(3), seq3); // -0.5