X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FAnnotatedPDBFileInputTest.java;h=feba9cb9d5c0f2b11d29bf1e68f0ab15a5e0ad60;hb=ab22918ab8fc67d30dad1fb1ae0f37e51f49df95;hp=6a61d2ce85194cddc1640a59af1e21b3149c936e;hpb=b8f13fd9ac44853d6510eac85edb60b117dc4620;p=jalview.git diff --git a/test/jalview/io/AnnotatedPDBFileInputTest.java b/test/jalview/io/AnnotatedPDBFileInputTest.java index 6a61d2c..feba9cb 100644 --- a/test/jalview/io/AnnotatedPDBFileInputTest.java +++ b/test/jalview/io/AnnotatedPDBFileInputTest.java @@ -1,17 +1,10 @@ package jalview.io; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.File; - -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertNotNull; +import static org.testng.AssertJUnit.assertTrue; +import jalview.bin.Cache; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.PDBEntry; @@ -22,6 +15,14 @@ import jalview.gui.Desktop; import jalview.structure.StructureMapping; import jalview.structure.StructureSelectionManager; +import java.io.File; + +import org.junit.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + public class AnnotatedPDBFileInputTest { @@ -31,9 +32,13 @@ public class AnnotatedPDBFileInputTest String pdbId; - @Before + @BeforeMethod public void setup() throws Exception { + Cache.applicationProperties.setProperty("STRUCT_FROM_PDB", + Boolean.TRUE.toString()); + Cache.applicationProperties.setProperty("ADD_SS_ANN", + Boolean.TRUE.toString()); FileLoader loader = new FileLoader(false); AlignFrame af = loader.LoadFileWaitTillLoaded(pdbStr, FormatAdapter.FILE); @@ -42,7 +47,7 @@ public class AnnotatedPDBFileInputTest .get(0).getId(); } - @Test + @Test(groups ={ "Functional" }) public void checkNoDuplicates() { // not strictly a requirement, but strange things may happen if multiple @@ -55,14 +60,14 @@ public class AnnotatedPDBFileInputTest { for (int q = p + 1; q < avec.length; q++) { - assertNotEquals( + Assert.assertNotEquals( "Found a duplicate annotation row " + avec[p].label, avec[p], avec[q]); } } } - @Test + @Test(groups ={ "Functional" }) public void checkPDBannotationSource() { @@ -80,7 +85,7 @@ public class AnnotatedPDBFileInputTest /** * Check sequence features have been added */ - @Test + @Test(groups ={ "Functional" }) public void checkPDBSequenceFeatures() { StructureSelectionManager ssm = StructureSelectionManager @@ -119,7 +124,7 @@ public class AnnotatedPDBFileInputTest assertEquals("TYR:314 1gaqC", sf[295].getDescription()); } - @Test + @Test(groups ={ "Functional" }) public void checkAnnotationWiring() { assertTrue(al.getAlignmentAnnotation() != null); @@ -168,7 +173,7 @@ public class AnnotatedPDBFileInputTest } - @Test + @Test(groups ={ "Functional" }) public void testJalviewProjectRelocationAnnotation() throws Exception {