X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Fjabaws%2FDisorderAnnotExportImport.java;h=9f624813f1e7abc27ec11bc3c4cebb4ea0a05944;hb=37de9310bec3501cbc6381e0c3dcb282fcaad812;hp=d488b44adaf3dd425dad25348e88ac5f4d549b78;hpb=ab43013b7e357b84b4abade0dba949668dfb2a0e;p=jalview.git diff --git a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java index d488b44..9f62481 100644 --- a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java +++ b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -20,11 +20,10 @@ */ package jalview.ws.jabaws; -import static org.junit.Assert.*; - -import java.util.ArrayList; -import java.util.List; +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.io.AnnotationFile; @@ -34,10 +33,15 @@ import jalview.ws.jws2.AADisorderClient; import jalview.ws.jws2.Jws2Discoverer; import jalview.ws.jws2.jabaws2.Jws2Instance; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; +import java.util.ArrayList; +import java.util.List; + +import org.testng.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; +@Test(groups = { "External" }) public class DisorderAnnotExportImport { public static String testseqs = "examples/uniref50.fa"; @@ -50,11 +54,11 @@ public class DisorderAnnotExportImport public static jalview.gui.AlignFrame af = null; - @BeforeClass + @BeforeClass(inheritGroups = true) public static void setUpBeforeClass() throws Exception { - - jalview.bin.Cache.initLogger(); + Cache.loadProperties("test/jalview/io/testProps.jvprops"); + Cache.initLogger(); disc = JalviewJabawsTestUtils.getJabawsDiscoverer(); iupreds = new ArrayList(); for (Jws2Instance svc : disc.getServices()) @@ -71,13 +75,14 @@ public class DisorderAnnotExportImport assertNotNull("Couldn't load test data ('" + testseqs + "')", af); } - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { if (af != null) { af.setVisible(false); af.dispose(); + af = null; } } @@ -124,9 +129,8 @@ public class DisorderAnnotExportImport { String aligfileout = new FormatAdapter().formatSequences("PFAM", al.getSequencesArray()); - String anfileout = new AnnotationFile().printAnnotations( - al.getAlignmentAnnotation(), al.getGroups(), - al.getProperties()); + String anfileout = new AnnotationFile() + .printAnnotationsForAlignment(al); assertTrue( "Test " + testname @@ -151,13 +155,13 @@ public class DisorderAnnotExportImport FormatAdapter.PASTE)); // test for consistency in io - StockholmFileTest.testAlignmentEquivalence(al, al_new); + StockholmFileTest.testAlignmentEquivalence(al, al_new, true); return; } catch (Exception e) { e.printStackTrace(); } - fail("Test " + Assert.fail("Test " + testname + "\nCouldn't complete Annotation file roundtrip input/output/input test."); }