X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fcontroller%2FAlignViewControllerTest.java;fp=test%2Fjalview%2Fcontroller%2FAlignViewControllerTest.java;h=d7f7acbfe5fe5bfc653e9c24452519af8b283f7d;hb=095f0d92cb343875bd0f76f833c1eaa8614c22cd;hp=7fd89655f7f7a8b578e7b60973c08c3b65ba0cf4;hpb=fbc92d8f171f75002890bfa0ea1f436f7125d3b5;p=jalview.git diff --git a/test/jalview/controller/AlignViewControllerTest.java b/test/jalview/controller/AlignViewControllerTest.java index 7fd8965..d7f7acb 100644 --- a/test/jalview/controller/AlignViewControllerTest.java +++ b/test/jalview/controller/AlignViewControllerTest.java @@ -53,6 +53,9 @@ public class AlignViewControllerTest null)); seq3.addSequenceFeature(new SequenceFeature("Metal", "desc", 11, 15, 0f, null)); + // disulfide bond is a 'contact feature' - only select its 'start' and 'end' + seq3.addSequenceFeature(new SequenceFeature("disulfide bond", "desc", 8, 12, + 0f, null)); /* * select the first three columns --> Metal in seq1 2-3 @@ -107,6 +110,30 @@ public class AlignViewControllerTest assertEquals(0, bs.cardinality()); /* + * columns 9-11 should not match disulfide bond at 8/12 + */ + sg.setStartRes(8); + sg.setEndRes(10); + bs.clear(); + seqCount = AlignViewController.findColumnsWithFeature("disulfide bond", + sg, bs); + assertEquals(0, seqCount); + assertEquals(0, bs.cardinality()); + + /* + * columns 6-14 should match disulfide bond at 8/12 + */ + sg.setStartRes(5); + sg.setEndRes(13); + bs.clear(); + seqCount = AlignViewController.findColumnsWithFeature("disulfide bond", + sg, bs); + assertEquals(1, seqCount); + assertEquals(2, bs.cardinality()); + assertTrue(bs.get(7)); + assertTrue(bs.get(11)); + + /* * look for a feature that isn't there */ sg.setStartRes(0);