From cd47f700cdf7aef86873db26ce3dc97a20c672c7 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 20 Oct 2014 13:46:36 +0100 Subject: [PATCH] JAL-674 test for the test for presence of annotation derived from particular PDB file --- test/jalview/io/AnnotatedPDBFileInputTest.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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); -- 1.7.10.2