X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FStockholmFileTest.java;h=cbcbdf9a0db88d937d5076ea299c0fc53598a929;hb=57dd16688caa6dacaeaf465bab3ee8b6126e1a51;hp=3c782751f66aa9db651291e84e1450e3af2a775f;hpb=4740ac2539b6c62c36a0c79ec6880237e50ea3f4;p=jalview.git diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index 3c78275..cbcbdf9 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -20,9 +20,10 @@ */ package jalview.io; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertNotNull; +import static org.testng.AssertJUnit.assertTrue; + import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; @@ -34,7 +35,7 @@ import java.util.BitSet; import java.util.HashMap; import java.util.Map; -import org.junit.Test; +import org.testng.annotations.Test; public class StockholmFileTest { @@ -42,13 +43,13 @@ public class StockholmFileTest static String PfamFile = "examples/PF00111_seed.stk", RfamFile = "examples/RF00031_folded.stk"; - @Test + @Test(groups = { "Functional" }) public void pfamFileIO() throws Exception { testFileIOwithFormat(new File(PfamFile), "STH", -1, 0); } - @Test + @Test(groups = { "Functional" }) public void pfamFileDataExtraction() throws Exception { AppletFormatAdapter af = new AppletFormatAdapter(); @@ -57,9 +58,9 @@ public class StockholmFileTest int numpdb = 0; for (SequenceI sq : al.getSequences()) { - if (sq.getPDBId() != null) + if (sq.getAllPDBEntries() != null) { - numpdb += sq.getPDBId().size(); + numpdb += sq.getAllPDBEntries().size(); } } assertTrue( @@ -67,7 +68,7 @@ public class StockholmFileTest numpdb > 0); } - @Test + @Test(groups = { "Functional" }) public void rfamFileIO() throws Exception { testFileIOwithFormat(new File(RfamFile), "STH", 2, 1); @@ -83,6 +84,7 @@ public class StockholmFileTest * - label for IO class used to write and read back in the data from * f */ + public static void testFileIOwithFormat(File f, String ioformat, int naliannot, int nminseqann) { @@ -134,7 +136,7 @@ public class StockholmFileTest if (naliannot > -1) { assertEquals("Number of alignment annotations", naliannot, - numaliannot); + numaliannot); } assertTrue( @@ -266,7 +268,7 @@ public class StockholmFileTest + (ignoreFeatures ? " ignoring." : ""), ignoreFeatures || (seq_original[i].getSequenceFeatures() == null && seq_new[in] - .getSequenceFeatures() == null) + .getSequenceFeatures() == null) || (seq_original[i].getSequenceFeatures() != null && seq_new[in] .getSequenceFeatures() != null)); // compare sequence features