X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fanalysis%2FAnnotationSorterTest.java;h=7153f6753a3741eeee3f4467017df0a5a7041eba;hb=53e0350c1c4464442938e4bace4e85bdbca665be;hp=1c5a7f9dffa445c3db50c8ebb8c39da87dd66097;hpb=578886777f32414fbf954ba86328c9943a64bccb;p=jalview.git diff --git a/test/jalview/analysis/AnnotationSorterTest.java b/test/jalview/analysis/AnnotationSorterTest.java index 1c5a7f9..7153f67 100644 --- a/test/jalview/analysis/AnnotationSorterTest.java +++ b/test/jalview/analysis/AnnotationSorterTest.java @@ -76,7 +76,7 @@ public class AnnotationSorterTest */ protected AlignmentAnnotation[] buildAnnotations(int numAnns) { - List annlist = new ArrayList(); + List annlist = new ArrayList<>(); for (int i = 0; i < numAnns; i++) { AlignmentAnnotation ann = new AlignmentAnnotation(SS + i, "", 0); @@ -115,7 +115,7 @@ public class AnnotationSorterTest * */ @Test(groups = { "Functional" }) - public void testSortBySequenceAndType_autocalcLast() + public void testSortBySequenceAndLabel_autocalcLast() { // @formatter:off anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0"; @@ -127,7 +127,7 @@ public class AnnotationSorterTest anns[6].sequenceRef = al.getSequenceAt(3); anns[6].label = "IRP"; // @formatter:on - AnnotationSorter testee = new AnnotationSorter(al, false); + AnnotationSorter testee = new AnnotationSorter(al, false, false); testee.sort(anns, SequenceAnnotationOrder.SEQUENCE_AND_LABEL); assertEquals("label5", anns[0].label); // for sequence 0 assertEquals("label0", anns[1].label); // for sequence 1 @@ -142,7 +142,7 @@ public class AnnotationSorterTest * Variant with autocalculated annotations sorting to front */ @Test(groups = { "Functional" }) - public void testSortBySequenceAndType_autocalcFirst() + public void testSortBySequenceAndLabel_autocalcFirst() { // @formatter:off anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0"; @@ -154,7 +154,7 @@ public class AnnotationSorterTest anns[6].sequenceRef = al.getSequenceAt(3); anns[6].label = "IRP"; // @formatter:on - AnnotationSorter testee = new AnnotationSorter(al, true); + AnnotationSorter testee = new AnnotationSorter(al, true, false); testee.sort(anns, SequenceAnnotationOrder.SEQUENCE_AND_LABEL); assertEquals("Quality", anns[0].label); // autocalc annotations assertEquals("Consensus", anns[1].label); // retain ordering @@ -178,7 +178,7 @@ public class AnnotationSorterTest * */ @Test(groups = { "Functional" }) - public void testSortByTypeAndSequence_autocalcLast() + public void testSortByLabelAndSequence_autocalcLast() { // @formatter:off anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0"; @@ -190,7 +190,7 @@ public class AnnotationSorterTest anns[6].sequenceRef = al.getSequenceAt(2); anns[6].label = "Structure"; // @formatter:on - AnnotationSorter testee = new AnnotationSorter(al, false); + AnnotationSorter testee = new AnnotationSorter(al, false, false); testee.sort(anns, SequenceAnnotationOrder.LABEL_AND_SEQUENCE); assertEquals("IRON", anns[0].label); // IRON / sequence 0 assertEquals("iron", anns[1].label); // iron / sequence 3 @@ -205,7 +205,7 @@ public class AnnotationSorterTest * Variant of test with autocalculated annotations sorted to front */ @Test(groups = { "Functional" }) - public void testSortByTypeAndSequence_autocalcFirst() + public void testSortByLabelAndSequence_autocalcFirst() { // @formatter:off anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0"; @@ -217,7 +217,7 @@ public class AnnotationSorterTest anns[6].sequenceRef = al.getSequenceAt(2); anns[6].label = "Structure"; // @formatter:on - AnnotationSorter testee = new AnnotationSorter(al, true); + AnnotationSorter testee = new AnnotationSorter(al, true, false); testee.sort(anns, SequenceAnnotationOrder.LABEL_AND_SEQUENCE); assertEquals("Quality", anns[0].label); // autocalc annotations assertEquals("Consensus", anns[1].label); // retain ordering @@ -245,7 +245,7 @@ public class AnnotationSorterTest anns[6].sequenceRef = al.getSequenceAt(2); anns[6].label = "Structure"; // @formatter:on - AnnotationSorter testee = new AnnotationSorter(al, true); + AnnotationSorter testee = new AnnotationSorter(al, true, false); testee.sort(anns, SequenceAnnotationOrder.NONE); assertEquals("Quality", anns[0].label); // autocalc annotations assertEquals("Consensus", anns[1].label); // retain ordering @@ -287,7 +287,7 @@ public class AnnotationSorterTest annotations[i].label = "label" + i; } long startTime = System.currentTimeMillis(); - AnnotationSorter testee = new AnnotationSorter(alignment, false); + AnnotationSorter testee = new AnnotationSorter(alignment, false, false); testee.sort(annotations, SequenceAnnotationOrder.LABEL_AND_SEQUENCE); long endTime = System.currentTimeMillis(); final long elapsed = endTime - startTime; @@ -331,7 +331,7 @@ public class AnnotationSorterTest annotations[i].label = "label" + i; } long startTime = System.currentTimeMillis(); - AnnotationSorter testee = new AnnotationSorter(alignment, false); + AnnotationSorter testee = new AnnotationSorter(alignment, false, false); testee.sort(annotations, SequenceAnnotationOrder.SEQUENCE_AND_LABEL); long endTime = System.currentTimeMillis(); final long elapsed = endTime - startTime; @@ -384,7 +384,7 @@ public class AnnotationSorterTest annotations[i].label = labels[r.nextInt(labels.length)]; } long startTime = System.currentTimeMillis(); - AnnotationSorter testee = new AnnotationSorter(alignment, false); + AnnotationSorter testee = new AnnotationSorter(alignment, false, false); testee.sort(annotations, SequenceAnnotationOrder.LABEL_AND_SEQUENCE); long endTime = System.currentTimeMillis(); long elapsed = endTime - startTime;