From d1718072ef2d5d921de0c253ccba3af665dbc6ac Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 15 Feb 2013 15:43:27 +0000 Subject: [PATCH] split test for general Stockholm IO consistency (JAL-1199) from test for IO of sequence metadata (JAL-1265) --- test/jalview/io/StockholmFileTest.java | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index caeb184..92ee5e0 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -22,19 +22,26 @@ public class StockholmFileTest @Test public void pfamFileIO() throws Exception { - test(new File(PfamFile)); - AppletFormatAdapter af = new AppletFormatAdapter(); - AlignmentI al = af.readFile(PfamFile, af.FILE, new IdentifyFile().Identify(PfamFile, af.FILE)); - int numpdb=0; - for (SequenceI sq:al.getSequences()) + testFileIOwithFormat(new File(PfamFile), "STH"); + } + @Test + public void pfamFileDataExtraction() throws Exception + { AppletFormatAdapter af = new AppletFormatAdapter(); + AlignmentI al = af.readFile(PfamFile, af.FILE, + new IdentifyFile().Identify(PfamFile, af.FILE)); + int numpdb = 0; + for (SequenceI sq : al.getSequences()) + { + if (sq.getPDBId() != null) { - if (sq.getPDBId()!=null) - { - numpdb+=sq.getPDBId().size(); - } + numpdb += sq.getPDBId().size(); } - assertTrue("PF00111 seed alignment has at least 1 PDB file, but the reader found none.",numpdb>0); + } + assertTrue( + "PF00111 seed alignment has at least 1 PDB file, but the reader found none.", + numpdb > 0); } + @Test public void rfamFileIO() throws Exception { -- 1.7.10.2