JAL-2780 JAL-2781 test AlignmentI.findAnnotations locates sequence associated annotat...
authorJim Procter <jprocter@issues.jalview.org>
Mon, 5 Feb 2018 16:36:33 +0000 (16:36 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 5 Feb 2018 16:36:33 +0000 (16:36 +0000)
test/jalview/datamodel/AlignmentTest.java

index 4d86bc7..74ac146 100644 (file)
@@ -668,6 +668,17 @@ public class AlignmentTest
     // third found.. so
     assertFalse(iter.hasNext());
 
+    // search for annotation on one sequence with a particular label - expect
+    // one
+    SequenceI sqfound;
+    anns = al.findAnnotations(sqfound = al.getSequenceAt(1), null,
+            "Secondary Structure");
+    iter = anns.iterator();
+    assertTrue(iter.hasNext());
+    // expect reference to sequence 1 in the alignment
+    assertTrue(sqfound == iter.next().sequenceRef);
+    assertFalse(iter.hasNext());
+
     // null on all parameters == find all annotations
     anns = al.findAnnotations(null, null, null);
     iter = anns.iterator();