X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fanalysis%2FTestAlignSeq.java;h=43ebd63565dff1d62a52ff85fb759701dbd3966d;hb=1d123a551af539931e27fb96f4c8e767608bf3ab;hp=4956bd8e7944c6fc144f146f01de9bd380b5d995;hpb=d69ae82ef958ae5bd67481d0b018a1db3662d4ae;p=jalview.git diff --git a/test/jalview/analysis/TestAlignSeq.java b/test/jalview/analysis/TestAlignSeq.java index 4956bd8..43ebd63 100644 --- a/test/jalview/analysis/TestAlignSeq.java +++ b/test/jalview/analysis/TestAlignSeq.java @@ -20,18 +20,18 @@ */ package jalview.analysis; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - -import java.io.PrintStream; - -import org.junit.Before; -import org.junit.Test; +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertNull; import jalview.datamodel.Mapping; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceI; +import java.io.PrintStream; + +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + /** * Test the alignment -> Mapping routines * @@ -46,7 +46,7 @@ public class TestAlignSeq /** * @throws java.lang.Exception */ - @Before + @BeforeMethod(alwaysRun = true) public void setUp() throws Exception { s1 = new Sequence("Seq1", "ASDFAQQQRRRSSS"); @@ -59,14 +59,13 @@ public class TestAlignSeq } - @Test + @Test(groups = { "Functional" }) /** * simple test that mapping from alignment corresponds identical positions. */ public void testGetMappingForS1() { - AlignSeq as = AlignSeq - .doGlobalNWAlignment(s1, s2, AlignSeq.PEP); + AlignSeq as = AlignSeq.doGlobalNWAlignment(s1, s2, AlignSeq.PEP); System.out.println("s1: " + as.getAStr1()); System.out.println("s2: " + as.getAStr2()); @@ -86,7 +85,7 @@ public class TestAlignSeq } } - @Test + @Test(groups = { "Functional" }) public void testExtractGaps() { assertNull(AlignSeq.extractGaps(null, null)); @@ -96,7 +95,7 @@ public class TestAlignSeq assertEquals("ABCD", AlignSeq.extractGaps(" .-", ". -A-B.C D.")); } - @Test + @Test(groups = { "Functional" }) public void testPrintAlignment() { AlignSeq as = AlignSeq.doGlobalNWAlignment(s1, s3, AlignSeq.PEP); @@ -120,7 +119,7 @@ public class TestAlignSeq String expected = "Score = 320\nLength of alignment = 10\nSequence Seq1 : 3 - 18 (Sequence length = 14)\nSequence Seq1 : 1 - 10 (Sequence length = 10)\n\n" + "Seq1 SDFAQQQRRR\n" + " ||||||| \n" - + "Seq1 SDFAQQQSSS\n\n" + "Percentage ID = 70.00\n\n"; + + "Seq1 SDFAQQQSSS\n\n" + "Percentage ID = 70.00\n"; assertEquals(expected, baos.toString()); } }