From: Jim Procter Date: Mon, 20 Oct 2014 12:46:36 +0000 (+0100) Subject: JAL-674 test for the test for presence of annotation derived from particular PDB... X-Git-Tag: Jalview_2_9~169^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=cd47f700cdf7aef86873db26ce3dc97a20c672c7;p=jalview.git JAL-674 test for the test for presence of annotation derived from particular PDB file --- diff --git a/test/jalview/io/AnnotatedPDBFileInputTest.java b/test/jalview/io/AnnotatedPDBFileInputTest.java index 451f4fd..acc2cb8 100644 --- a/test/jalview/io/AnnotatedPDBFileInputTest.java +++ b/test/jalview/io/AnnotatedPDBFileInputTest.java @@ -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);