X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fanalysis%2FAlignmentSorterTest.java;fp=test%2Fjalview%2Fanalysis%2FAlignmentSorterTest.java;h=090ae1ac15373d4407869680947e0a8aec8ceef9;hb=c4c37610dc373b9b3349e5c0915c6eddda2efe31;hp=3b9be23421d5bc8a47d2b32075b444d7d807d7d5;hpb=e226ed0ad6ba8552a0b70fb083cf00060588855d;p=jalview.git diff --git a/test/jalview/analysis/AlignmentSorterTest.java b/test/jalview/analysis/AlignmentSorterTest.java index 3b9be23..090ae1a 100644 --- a/test/jalview/analysis/AlignmentSorterTest.java +++ b/test/jalview/analysis/AlignmentSorterTest.java @@ -11,10 +11,10 @@ import jalview.datamodel.SequenceI; 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") @@ -31,7 +31,10 @@ public class AlignmentSorterTest /* * 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); @@ -64,7 +67,7 @@ public class AlignmentSorterTest * 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