assertThat(ann.annotations, is(emptyArray()));
}
+ @Test(groups = "Functional")
+ public void testMakeVisibleAnnotation_HiddenRegionBeyondSize()
+ {
+ Annotation[] annots = annotsRange(4);
+ AlignmentAnnotation ann = new AlignmentAnnotation("label", "desc", annots);
+ HiddenColumns hc = new HiddenColumns();
+ hc.hideColumns(6, 7);
+ ann.makeVisibleAnnotation(hc);
+ assertThat(ann.annotations, matchesAnnotations(annots));
+ }
+
+ @Test(groups = "Functional")
+ public void testMakeVisibleAnnotation_HiddenRegionAndTrimEndBeyondSize()
+ {
+ Annotation[] annots = annotsRange(4);
+ AlignmentAnnotation ann = new AlignmentAnnotation("label", "desc", annots);
+ HiddenColumns hc = new HiddenColumns();
+ hc.hideColumns(6, 7);
+ ann.makeVisibleAnnotation(0, 10, hc);
+ assertThat(ann.annotations, matchesAnnotations(annots));
+ }
+
+ @Test(groups = "Functional")
+ public void testMakeVisibleAnnotation_HiddenRegionBeforeStart()
+ {
+ Annotation[] annots = annotsRange(4);
+ AlignmentAnnotation ann = new AlignmentAnnotation("label", "desc", annots);
+ HiddenColumns hc = new HiddenColumns();
+ hc.hideColumns(-3, -2);
+ ann.makeVisibleAnnotation(hc);
+ assertThat(ann.annotations, matchesAnnotations(annots));
+ }
+
+ @Test(groups = "Functional")
+ public void testMakeVisibleAnnotation_HiddenRegionAndTrimStartBeforeStart()
+ {
+ Annotation[] annots = annotsRange(4);
+ AlignmentAnnotation ann = new AlignmentAnnotation("label", "desc", annots);
+ HiddenColumns hc = new HiddenColumns();
+ hc.hideColumns(-3, -2);
+ ann.makeVisibleAnnotation(-5, annots.length - 1, hc);
+ assertThat(ann.annotations, matchesAnnotations(annots));
+ }
+
static Annotation[] annotsRange(int stop)
{
Annotation[] annotations = new Annotation[stop];