3 import static org.junit.Assert.assertNotNull;
4 import static org.junit.Assert.assertTrue;
5 import jalview.datamodel.AlignmentAnnotation;
6 import jalview.datamodel.AlignmentI;
7 import jalview.gui.AlignFrame;
9 import org.junit.Before;
10 import org.junit.Test;
12 public class AnnotatedPDBFileInputTest
18 public void setup() throws Exception
20 FileLoader loader = new FileLoader(false);
21 AlignFrame af = loader.LoadFileWaitTillLoaded("examples/1gaq.txt",
23 al = af.getViewport().getAlignment();
27 public void checkAnnotationWiring()
29 assertTrue(al.getAlignmentAnnotation() != null);
30 // verify that all sequence annotation is doubly referenced
31 for (AlignmentAnnotation aa : al.getAlignmentAnnotation())
33 if (aa.sequenceRef != null)
35 assertTrue(al.getSequences().contains(aa.sequenceRef));
36 assertNotNull(aa.sequenceRef.getAnnotation());
37 boolean found = false;
38 for (AlignmentAnnotation sqan : aa.sequenceRef.getAnnotation())
47 "Couldn't find sequence associated annotation "
49 + " on the sequence it is associated with.\nSequence associated editing will fail.",