JAL-674 test for the test for presence of annotation derived from particular PDB...
authorJim Procter <j.procter@dundee.ac.uk>
Mon, 20 Oct 2014 12:46:36 +0000 (13:46 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Tue, 21 Oct 2014 10:34:53 +0000 (11:34 +0100)
test/jalview/io/AnnotatedPDBFileInputTest.java

index 451f4fd..acc2cb8 100644 (file)
@@ -5,6 +5,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 
 import org.junit.Before;
@@ -15,11 +16,12 @@ public class AnnotatedPDBFileInputTest
 
   AlignmentI al;
 
+  String pdbStr = "examples/2GIS.pdb";
   @Before
   public void setup() throws Exception
   {
     FileLoader loader = new FileLoader(false);
-    AlignFrame af = loader.LoadFileWaitTillLoaded("examples/1gaq.txt",
+    AlignFrame af = loader.LoadFileWaitTillLoaded(pdbStr,
             FormatAdapter.FILE);
     al = af.getViewport().getAlignment();
   }
@@ -45,6 +47,21 @@ public class AnnotatedPDBFileInputTest
   }
 
   @Test
+  public void checkPDBannotationSource()
+  {
+
+    for (SequenceI asq : al.getSequences())
+    {
+      for (AlignmentAnnotation aa : asq.getAnnotation())
+      {
+
+        System.out.println("CalcId: " + aa.getCalcId());
+        assertTrue(MCview.PDBfile.isCalcIdForFile(aa.getCalcId(), pdbStr));
+      }
+    }
+  }
+
+  @Test
   public void checkAnnotationWiring()
   {
     assertTrue(al.getAlignmentAnnotation() != null);