X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fdatamodel%2FAlignmentTest.java;h=2eaae9408d14caa274371dde593e6c656d304a71;hb=90f6f3090a255a7059d0d0f26ddd848253bf9df6;hp=df98af9ff3a308f36b8ff0c2f353729407df55df;hpb=be32c14cd8e48fe0a207cd7030cb9cd46f894678;p=jalview.git diff --git a/test/jalview/datamodel/AlignmentTest.java b/test/jalview/datamodel/AlignmentTest.java index df98af9..2eaae94 100644 --- a/test/jalview/datamodel/AlignmentTest.java +++ b/test/jalview/datamodel/AlignmentTest.java @@ -1,8 +1,9 @@ package jalview.datamodel; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertFalse; +import static org.testng.AssertJUnit.assertTrue; + import jalview.io.AppletFormatAdapter; import jalview.io.FormatAdapter; import jalview.util.MapList; @@ -10,8 +11,8 @@ import jalview.util.MapList; import java.io.IOException; import java.util.Iterator; -import org.junit.Before; -import org.junit.Test; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; /** * Unit tests for Alignment datamodel. @@ -68,7 +69,7 @@ public class AlignmentTest protected AlignmentI loadAlignment(final String data, String format) throws IOException { - Alignment a = new FormatAdapter().readFile(data, + AlignmentI a = new FormatAdapter().readFile(data, AppletFormatAdapter.PASTE, format); a.setDataset(null); return a; @@ -78,7 +79,7 @@ public class AlignmentTest * Read in Stockholm format test data including secondary structure * annotations. */ - @Before + @BeforeMethod(alwaysRun = true) public void setUp() throws IOException { al = loadAlignment(TEST_DATA, "STH"); @@ -93,7 +94,7 @@ public class AlignmentTest /** * Test method that returns annotations that match on calcId. */ - @Test + @Test(groups ={ "Functional" }) public void testFindAnnotation_byCalcId() { Iterable anns = al @@ -105,7 +106,7 @@ public class AlignmentTest assertFalse(iter.hasNext()); } - @Test + @Test(groups ={ "Functional" }) public void testDeleteAllAnnotations_includingAutocalculated() { AlignmentAnnotation aa = new AlignmentAnnotation("Consensus", @@ -119,7 +120,7 @@ public class AlignmentTest assertEquals("Not all deleted", 0, al.getAlignmentAnnotation().length); } - @Test + @Test(groups ={ "Functional" }) public void testDeleteAllAnnotations_excludingAutocalculated() { AlignmentAnnotation aa = new AlignmentAnnotation("Consensus", @@ -143,7 +144,7 @@ public class AlignmentTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testAlignAs_dnaAsDna() throws IOException { // aligned cDNA: @@ -175,7 +176,7 @@ public class AlignmentTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testAlignAs_proteinAsCdna() throws IOException { // see also AlignmentUtilsTests @@ -199,7 +200,7 @@ public class AlignmentTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testAlignAs_cdnaAsProtein() throws IOException { /* @@ -231,7 +232,7 @@ public class AlignmentTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testAlignAs_dnaAsProtein_withIntrons() throws IOException { /*