From 78c70a218e5d10eede4f196b99436a4f5e00f392 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 5 Feb 2018 16:36:33 +0000 Subject: [PATCH] JAL-2780 JAL-2781 test AlignmentI.findAnnotations locates sequence associated annotation by id and sequence reference --- test/jalview/datamodel/AlignmentTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/jalview/datamodel/AlignmentTest.java b/test/jalview/datamodel/AlignmentTest.java index 4d86bc7..74ac146 100644 --- a/test/jalview/datamodel/AlignmentTest.java +++ b/test/jalview/datamodel/AlignmentTest.java @@ -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(); -- 1.7.10.2