+ @Test
+ public void testDeleteAllAnnotations_includingAutocalculated()
+ {
+ AlignmentAnnotation aa = new AlignmentAnnotation("Consensus",
+ "Consensus", 0.5);
+ aa.autoCalculated = true;
+ al.addAnnotation(aa);
+ AlignmentAnnotation[] anns = al.getAlignmentAnnotation();
+ assertEquals("Wrong number of annotations before deleting", 4,
+ anns.length);
+ al.deleteAllAnnotations(true);
+ assertEquals("Not all deleted", 0, al.getAlignmentAnnotation().length);
+ }
+
+ @Test
+ public void testDeleteAllAnnotations_excludingAutocalculated()
+ {
+ AlignmentAnnotation aa = new AlignmentAnnotation("Consensus",
+ "Consensus", 0.5);
+ aa.autoCalculated = true;
+ al.addAnnotation(aa);
+ AlignmentAnnotation[] anns = al.getAlignmentAnnotation();
+ assertEquals("Wrong number of annotations before deleting", 4,
+ anns.length);
+ al.deleteAllAnnotations(false);
+ assertEquals("Not just one annotation left", 1,
+ al.getAlignmentAnnotation().length);
+ }
+