JAL-1270 JUnit to TestNG refactoring
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 19 Jun 2015 13:04:02 +0000 (14:04 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 19 Jun 2015 13:04:02 +0000 (14:04 +0100)
108 files changed:
.classpath
.gitignore
build.xml
src/jalview/gui/AppJmol.java
src/jalview/io/AlignmentProperties.java
src/jalview/io/BLCFile.java
src/jalview/ws/dbsources/EbiFileRetrievedProxy.java
test/MCview/AtomTest.java
test/MCview/BondTest.java
test/MCview/PDBChainTest.java
test/MCview/PDBfileTest.java
test/MCview/ResidueTest.java
test/com/stevesoft/pat/RegexWriterTest.java
test/jalview/analysis/AAFrequencyTest.java
test/jalview/analysis/AlignmentAnnotationUtilsTest.java
test/jalview/analysis/AlignmentUtilsTests.java
test/jalview/analysis/AnnotationSorterTest.java
test/jalview/analysis/CodingUtilsTest.java
test/jalview/analysis/CrossRefTest.java
test/jalview/analysis/DnaTest.java
test/jalview/analysis/GroupingTest.java
test/jalview/analysis/ParsePropertiesTest.java
test/jalview/analysis/TestAlignSeq.java
test/jalview/analysis/scoremodels/FeatureScoreModelTest.java
test/jalview/bin/CommandLineOperations.java
test/jalview/commands/EditCommandTest.java
test/jalview/datamodel/AlignedCodonFrameTest.java
test/jalview/datamodel/AlignedCodonIteratorTest.java
test/jalview/datamodel/AlignedCodonTest.java
test/jalview/datamodel/AlignmentAnnotationTests.java
test/jalview/datamodel/AlignmentTest.java
test/jalview/datamodel/ColumnSelectionTest.java
test/jalview/datamodel/DBRefEntryTest.java
test/jalview/datamodel/MappingTest.java
test/jalview/datamodel/PDBEntryTest.java
test/jalview/datamodel/SearchResultsTest.java
test/jalview/datamodel/SeqCigarTest.java
test/jalview/datamodel/SequenceTest.java
test/jalview/datamodel/xdb/embl/EmblFileTest.java
test/jalview/ext/jmol/PDBFileWithJmolTest.java
test/jalview/ext/paradise/TestAnnotate3D.java
test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java
test/jalview/ext/rbvi/chimera/ChimeraConnect.java
test/jalview/ext/rbvi/chimera/JalviewChimeraView.java
test/jalview/gui/AlignViewportTest.java
test/jalview/gui/AnnotationChooserTest.java
test/jalview/gui/FontChooserTest.java
test/jalview/gui/HelpTest.java
test/jalview/gui/JAL1353bugdemo.java
test/jalview/gui/JvSwingUtilsTest.java
test/jalview/gui/PDBSearchPanelTest.java
test/jalview/gui/PaintRefresherTest.java
test/jalview/gui/PopupMenuTest.java
test/jalview/gui/ProgressBarTest.java
test/jalview/gui/SequenceRendererTest.java
test/jalview/gui/StructureChooserTest.java
test/jalview/io/AnnotatedPDBFileInputTest.java
test/jalview/io/AnnotationFileIOTest.java
test/jalview/io/BioJsHTMLOutputTest.java
test/jalview/io/FileIOTester.java
test/jalview/io/HtmlFileTest.java
test/jalview/io/JSONFileTest.java
test/jalview/io/Jalview2xmlTests.java
test/jalview/io/NewickFileTests.java
test/jalview/io/PhylipFileTests.java
test/jalview/io/RNAMLfileTest.java
test/jalview/io/StockholmFileTest.java
test/jalview/io/TCoffeeScoreFileTest.java
test/jalview/schemes/DnaCodonTests.java
test/jalview/schemes/ResiduePropertiesTest.java
test/jalview/schemes/ScoreMatrixPrinter.java
test/jalview/structure/Mapping.java
test/jalview/structure/StructureSelectionManagerTest.java
test/jalview/structures/models/AAStructureBindingModelTest.java
test/jalview/util/ColorUtilsTest.java
test/jalview/util/ComparisonTest.java
test/jalview/util/DBRefUtilsTest.java
test/jalview/util/MapListTest.java
test/jalview/util/MappingUtilsTest.java
test/jalview/util/QuickSortTest.java
test/jalview/util/ShiftListTest.java
test/jalview/util/StringUtilsTest.java
test/jalview/viewmodel/styles/ViewStyleTest.java
test/jalview/ws/PDBSequenceFetcherTest.java
test/jalview/ws/dbsources/PDBRestClientTest.java
test/jalview/ws/dbsources/UniprotTest.java
test/jalview/ws/gui/Jws2ParamView.java
test/jalview/ws/jabaws/DisorderAnnotExportImport.java
test/jalview/ws/jabaws/JalviewJabawsTestUtils.java
test/jalview/ws/jabaws/JpredJabaStructExportImport.java
test/jalview/ws/jabaws/MinJabawsClientTests.java
test/jalview/ws/jabaws/RNAStructExportImport.java
test/jalview/ws/jws2/ParameterUtilsTest.java
test/jalview/ws/rest/RestClientTest.java
test/jalview/ws/rest/ShmmrRSBSService.java
test/jalview/ws/seqfetcher/DasSequenceFetcher.java
test/jalview/ws/seqfetcher/DbRefFetcherTest.java
utils/hamcrest-core-1.3.jar [new file with mode: 0644]
utils/jalview_testng.xml [new file with mode: 0644]
utils/junit-4.12.jar [new file with mode: 0644]
utils/testnglibs/bsh-2.0b4.jar [new file with mode: 0644]
utils/testnglibs/guava-base-r03.jar [new file with mode: 0644]
utils/testnglibs/guava-collections-r03.jar [new file with mode: 0644]
utils/testnglibs/jcommander.jar [new file with mode: 0644]
utils/testnglibs/junit-4.12.jar [new file with mode: 0644]
utils/testnglibs/snakeyaml.jar [new file with mode: 0644]
utils/testnglibs/testng-sources.jar [new file with mode: 0644]
utils/testnglibs/testng.jar [new file with mode: 0644]

index 0abfdb3..3fac886 100644 (file)
@@ -66,5 +66,6 @@
        <classpathentry kind="lib" path="lib/jetty-http-9.2.10.v20150310.jar"/>
        <classpathentry kind="lib" path="lib/jetty-io-9.2.10.v20150310.jar"/>
        <classpathentry kind="lib" path="lib/java-json.jar"/>
+       <classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/>
        <classpathentry kind="output" path="classes"/>
 </classpath>
index 0c12fb0..2b6921b 100644 (file)
@@ -1,6 +1,9 @@
 .project
 /dist
 /classes
+/tests
+/test-reports
+/test-output
 .externalToolBuilders/Jalview Release indices [Builder].launch
 /.DS_Store
 .DS_Store
index c079df9..dbf1df3 100755 (executable)
--- a/build.xml
+++ b/build.xml
     <property name="jsonSimple" value="json_simple-1.1.jar" />
     <property name="javaJson" value="java-json.jar" />
     <property name="jalviewLiteJar" value="jalviewApplet.jar" />
+       <property name="reportDir" value="test-reports" />
+       <property name="testDir" value="test" />
+       <property name="testOutputDir" value="tests" />
     <!-- switch to indicate if we should obfuscate jalviewLite -->
     <!-- <property name="donotobfuscate" value="true"/> -->
     <!-- switch to exclude associations from generated jnlp files -->
       <exclude name="com/stevesoft/**" />
     </javac>
   </target>
+  
+  
+  <target name="testclean" depends="init">
+    <delete dir="${testOutputDir}" includes="*,**/*"/>
+  </target>
+  
+  <target name="prepareTests" depends="init">
+       <mkdir dir="${testOutputDir}" />
+       <copy todir="${testOutputDir}">
+               <fileset dir=".">
+                       <include name="${docDir}/**/*.*" />
+                       <include name="${helpDir}/**/*.*" />
+                       <include name="${libDir}/*.jar" />
+               </fileset>
+               <fileset dir="${resourceDir}">
+                       <include name="**/*.*" />
+               </fileset>
+       </copy>
+  </target>  
+  
+  <target name="buildTests" depends="prepareTests">
+       <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${testOutputDir}"
+               debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
+               <exclude name="jalview/*applet*" />
+               <exclude name="jalview/appletgui/**" />
+       </javac>
+       <javac source="1.5" target="1.5" srcdir="${testDir}" destdir="${testOutputDir}"
+               debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
+       </javac>
+  </target>
+  
+  <taskdef name="testng" classname="org.testng.TestNGAntTask" >            
+       <classpath location="utils/testnglibs/testng.jar" />
+  </taskdef>
+  
+  <target name="testng" depends="buildTests">
+       <testng classpathref="build.classpath" outputDir="${reportDir}"
+               haltOnFailure="false">
+               <classpath location="${testOutputDir}" />
+               <xmlfileset dir="utils" includes="jalview_testng.xml" />
+       </testng>
+  </target>
+  
   <target name="buildindices" depends="init, prepare" unless="help.uptodate">
     <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
       <arg line="html" />
index 6139669..c2a7299 100644 (file)
@@ -1084,7 +1084,7 @@ public class AppJmol extends StructureViewerBase
       getSize(currentSize);
       g.getClipBounds(rectClip);
 
-      if (jmb.fileLoadingError != null)
+      if (jmb != null && jmb.fileLoadingError != null)
       {
         g.setColor(Color.black);
         g.fillRect(0, 0, currentSize.width, currentSize.height);
index 9effa74..cb4b7ad 100644 (file)
@@ -20,8 +20,8 @@
  */
 package jalview.io;
 
-import java.io.StringWriter;
 import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.Enumeration;
 import java.util.Hashtable;
 
@@ -61,11 +61,15 @@ public class AlignmentProperties
               - alignment.getSequenceAt(i).getStart();
       avg += size;
       if (size > max)
+      {
         max = size;
+      }
       if (size < min)
+      {
         min = size;
+      }
     }
-    avg = avg / (float) alignment.getHeight();
+    avg = avg / alignment.getHeight();
     pw.print(nl);
     pw.print("Sequences: " + alignment.getHeight());
     pw.print(nl);
index 0376c2c..c7cf2d6 100755 (executable)
  */
 package jalview.io;
 
-import java.io.*;
-import java.util.*;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
 
-import jalview.datamodel.*;
+import java.io.IOException;
+import java.util.Vector;
 
 /**
  * DOCUMENT ME!
@@ -115,7 +116,9 @@ public class BLCFile extends AlignFile
       {
         line = nextLine();
         if (line == null)
+        {
           break;
+        }
         // seek end of ids
         if (line.indexOf("*") > -1)
         {
@@ -150,7 +153,9 @@ public class BLCFile extends AlignFile
         }
       } while (!idsFound);
       if (line == null)
+       {
         break; // end of file.
+      }
       int starCol = line.indexOf("*");
       seqstrings = new StringBuffer[seqs.size()];
 
@@ -198,9 +203,11 @@ public class BLCFile extends AlignFile
     }
     if (seqs.size() > 0)
     {
-      if (headerLines.length() > 1 + numHeaderLines) // could see if buffer is
+      if (headerLines.length() > 1 + numHeaderLines)
+      {
         // just whitespace or not.
         setAlignmentProperty("Comments", headerLines.toString());
+      }
       setAlignmentProperty("iteration", "" + iterationCount);
     }
   }
index 45f4f7a..40e2193 100644 (file)
@@ -23,6 +23,7 @@ package jalview.ws.dbsources;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
+
 import jalview.ws.seqfetcher.DbSourceProxyImpl;
 
 public abstract class EbiFileRetrievedProxy extends DbSourceProxyImpl
@@ -36,7 +37,9 @@ public abstract class EbiFileRetrievedProxy extends DbSourceProxyImpl
   public StringBuffer getRawRecords()
   {
     if (file == null)
+    {
       return null;
+    }
     StringBuffer bf = null;
     try
     {
index 8c271b3..f337535 100644 (file)
@@ -1,9 +1,8 @@
 package MCview;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import org.junit.Test;
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
+import org.testng.Assert;
 
 public class AtomTest
 {
@@ -54,7 +53,7 @@ public class AtomTest
     {
       new Atom(
               "ATOM    34N  NE2 GLN A  48      22.290   8.595  17.680  1.00 14.30           N");
-      fail("Expected exception");
+      Assert.fail("Expected exception");
     } catch (NumberFormatException e)
     {
       // expected
index 333bfce..0060e3f 100644 (file)
@@ -1,8 +1,7 @@
 package MCview;
 
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
 
 public class BondTest
 {
index 5be43b3..193d294 100644 (file)
@@ -1,15 +1,13 @@
 package MCview;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import java.awt.Color;
 import java.util.Vector;
 
-import org.junit.Test;
-
 import jalview.analysis.AlignSeq;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Sequence;
index 5d69a00..cce8634 100644 (file)
@@ -1,10 +1,15 @@
 package MCview;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertNull;
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertTrue;
+
+import java.io.IOException;
+
+import org.testng.annotations.Test;
+
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
@@ -13,11 +18,6 @@ import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 import jalview.io.AppletFormatAdapter;
 
-import java.io.IOException;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
 public class PDBfileTest
 {
   @Test
@@ -247,8 +247,8 @@ public class PDBfileTest
    * 
    * @throws IOException
    */
-  @Test
-  @Ignore
+
+  @Test(enabled = false)
   public void testParse_withAnnotate3D() throws IOException
   {
     // TODO requires a mock for Annotate3D processing
index ed98c5b..5cebe3c 100644 (file)
@@ -1,12 +1,10 @@
 package MCview;
 
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import java.util.Vector;
 
-import org.junit.Test;
-
 public class ResidueTest
 {
 
index d91502e..ea07aa2 100644 (file)
@@ -1,11 +1,11 @@
 package com.stevesoft.pat;
 
-import static org.junit.Assert.assertEquals;
+import static org.testng.AssertJUnit.assertEquals;
 
 import java.io.IOException;
 import java.io.StringWriter;
 
-import org.junit.Test;
+import org.testng.annotations.Test;
 
 /**
  * Test class refactored from RegexWriter main method
index 788e742..04ab3bf 100644 (file)
@@ -1,14 +1,13 @@
 
 package jalview.analysis;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 
 import java.util.Hashtable;
 
-import org.junit.Test;
-
 public class AAFrequencyTest
 {
   private static final String C = AAFrequency.MAXCOUNT;
index c34bb68..34d2f32 100644 (file)
@@ -1,9 +1,10 @@
 package jalview.analysis;
 
-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 org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.BitSet;
@@ -12,9 +13,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.junit.Before;
-import org.junit.Test;
-
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Annotation;
@@ -118,7 +116,7 @@ public class AlignmentAnnotationUtilsTest
    * 
    * @throws IOException
    */
-  @Before
+  @BeforeMethod
   public void setUp() throws IOException
   {
     alignment = new jalview.io.FormatAdapter().readFile(TEST_DATA,
index 02955f1..d32181f 100644 (file)
  */
 package jalview.analysis;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -37,8 +37,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.junit.Test;
-
 import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
index 239eb4c..dfe5532 100644 (file)
@@ -1,18 +1,19 @@
 package jalview.analysis;
 
-import static org.junit.Assert.assertEquals;
-import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
-import jalview.datamodel.Alignment;
-import jalview.datamodel.AlignmentAnnotation;
-import jalview.datamodel.Sequence;
-import jalview.datamodel.SequenceI;
+import static org.testng.AssertJUnit.assertEquals;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
 
 public class AnnotationSorterTest
 {
@@ -29,7 +30,7 @@ public class AnnotationSorterTest
   /*
    * Set up 6 sequences and 7 annotations.
    */
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     al = buildAlignment(NUM_SEQS);
index 0f235fb..a4b6c3f 100644 (file)
@@ -1,12 +1,10 @@
 package jalview.analysis;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import java.util.Arrays;
 
-import org.junit.Test;
-
 public class CodingUtilsTest
 {
 
index 35606f0..77bd6b9 100644 (file)
@@ -1,10 +1,8 @@
 package jalview.analysis;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-
-import org.junit.Test;
-
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
 import jalview.datamodel.DBRefEntry;
 
 public class CrossRefTest
index 01ed183..693c912 100644 (file)
@@ -1,8 +1,9 @@
 package jalview.analysis;
 
-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 org.testng.annotations.Test;
 import jalview.api.AlignViewportI;
 import jalview.datamodel.AlignedCodon;
 import jalview.datamodel.Alignment;
@@ -14,8 +15,6 @@ import jalview.io.FormatAdapter;
 
 import java.io.IOException;
 
-import org.junit.Test;
-
 public class DnaTest
 {
   // @formatter:off
index 5c7a305..e046c0c 100644 (file)
@@ -1,5 +1,7 @@
 package jalview.analysis;
 
+import org.testng.annotations.Test;
+import org.testng.AssertJUnit;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.ColumnSelection;
@@ -10,9 +12,6 @@ import jalview.datamodel.SequenceI;
 import java.util.ArrayList;
 import java.util.Arrays;
 
-import org.junit.Assert;
-import org.junit.Test;
-
 public class GroupingTest
 {
   Sequence s1 = new Sequence("s1", "AAAADDDDEEEE");
@@ -64,17 +63,17 @@ public class GroupingTest
             alignment.getSequencesArray(), cs,
             Arrays.asList(new SequenceGroup[]
             { sg1, sg2 }));
-    Assert.assertEquals(seqgroupsString.length, seqgroupsColSel.length);
+    AssertJUnit.assertEquals(seqgroupsString.length, seqgroupsColSel.length);
     for (int p = 0; p < seqgroupsString.length; p++)
     {
-      Assert.assertEquals(seqgroupsString[p].getName(),
+      AssertJUnit.assertEquals(seqgroupsString[p].getName(),
               seqgroupsColSel[p].getName());
-      Assert.assertArrayEquals(
+      AssertJUnit.assertArrayEquals(
               seqgroupsString[p].getSequencesInOrder(alignment),
               seqgroupsColSel[p].getSequencesInOrder(alignment));
       if (seqgroupsString[p].getSequences().contains(s2))
       {
-        Assert.assertTrue(seqgroupsString[p].getSize() == 2);
+        AssertJUnit.assertTrue(seqgroupsString[p].getSize() == 2);
       }
     }
   }
index a01d255..acf295e 100644 (file)
@@ -1,13 +1,11 @@
 package jalview.analysis;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import java.util.List;
 
-import org.junit.Before;
-import org.junit.Test;
-
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Sequence;
@@ -23,7 +21,7 @@ public class ParsePropertiesTest
   /**
    * Construct an alignment with 4 sequences with varying description format
    */
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     SequenceI[] seqs = new SequenceI[]
index 4956bd8..2845d91 100644 (file)
  */
 package jalview.analysis;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import java.io.PrintStream;
 
-import org.junit.Before;
-import org.junit.Test;
-
 import jalview.datamodel.Mapping;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
@@ -46,7 +44,7 @@ public class TestAlignSeq
   /**
    * @throws java.lang.Exception
    */
-  @Before
+  @BeforeMethod
   public void setUp() throws Exception
   {
     s1 = new Sequence("Seq1", "ASDFAQQQRRRSSS");
index 1dbaa4a..b40382d 100644 (file)
@@ -1,5 +1,7 @@
 package jalview.analysis.scoremodels;
 
+import org.testng.annotations.Test;
+import org.testng.AssertJUnit;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
@@ -7,9 +9,6 @@ import jalview.gui.AlignFrame;
 import jalview.io.FileLoader;
 import jalview.io.FormatAdapter;
 
-import org.junit.Assert;
-import org.junit.Test;
-
 public class FeatureScoreModelTest
 {
   public static String alntestFile = "FER1_MESCR/72-76 DVYIL\nFER1_SPIOL/71-75 DVYIL\nFER3_RAPSA/21-25 DVYVL\nFER1_MAIZE/73-77 DVYIL\n";
@@ -29,8 +28,8 @@ public class FeatureScoreModelTest
     AlignFrame alf = new FileLoader(false).LoadFileWaitTillLoaded(alntestFile,
             FormatAdapter.PASTE);
     AlignmentI al = alf.getViewport().getAlignment();
-    Assert.assertEquals(4, al.getHeight());
-    Assert.assertEquals(5, al.getWidth());
+    AssertJUnit.assertEquals(4, al.getHeight());
+    AssertJUnit.assertEquals(5, al.getWidth());
     for (int i = 0; i < 4; i++)
     {
       SequenceI ds = al.getSequenceAt(i).getDatasetSequence();
@@ -55,18 +54,18 @@ public class FeatureScoreModelTest
     alf.getFeatureRenderer().setVisible("sf2");
     alf.getFeatureRenderer().setVisible("sf3");
     alf.getFeatureRenderer().findAllFeatures(true);
-    Assert.assertEquals("Number of feature types", 3, alf
+    AssertJUnit.assertEquals("Number of feature types", 3, alf
             .getFeatureRenderer().getDisplayedFeatureTypes().length);
-    Assert.assertTrue(alf.getCurrentView().areFeaturesDisplayed());
+    AssertJUnit.assertTrue(alf.getCurrentView().areFeaturesDisplayed());
     FeatureScoreModel fsm = new FeatureScoreModel();
-    Assert.assertTrue(fsm.configureFromAlignmentView(alf.getCurrentView()
+    AssertJUnit.assertTrue(fsm.configureFromAlignmentView(alf.getCurrentView()
             .getAlignPanel()));
     alf.selectAllSequenceMenuItem_actionPerformed(null);
     float[][] dm = fsm.findDistances(alf.getViewport().getAlignmentView(
             true));
-    Assert.assertTrue("FER1_MESCR should be identical with RAPSA (2)",
+    AssertJUnit.assertTrue("FER1_MESCR should be identical with RAPSA (2)",
             dm[0][2] == 0f);
-    Assert.assertTrue(
+    AssertJUnit.assertTrue(
             "FER1_MESCR should be further from SPIOL (1) than it is from RAPSA (2)",
             dm[0][1] > dm[0][2]);
 
index ec0b160..d9d3bb3 100644 (file)
  */
 package jalview.bin;
 
-import static org.junit.Assert.*;
-
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.AssertJUnit;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
 
 public class CommandLineOperations
 {
@@ -131,16 +131,17 @@ public class CommandLineOperations
         System.out.println("Testing with Headless argument: '" + harg
                 + "'\n");
         Worker worker = jalviewDesktopRunner(withAwt, cmd, 9000);
-        assertTrue("Didn't create an output EPS file.[" + harg + "]",
-                new File("test_uniref50_out.eps").exists());
-        assertTrue("Didn't create an EPS file with any content[" + harg
-                + "]", new File("test_uniref50_out.eps").length() > 4096);
+        AssertJUnit.assertTrue("Didn't create an output EPS file.[" + harg
+                + "]", new File("test_uniref50_out.eps").exists());
+        AssertJUnit.assertTrue(
+                "Didn't create an EPS file with any content[" + harg + "]",
+                new File("test_uniref50_out.eps").length() > 4096);
         if (worker.exit == null)
         {
           worker.interrupt();
           Thread.currentThread().interrupt();
           worker.process.destroy();
-          fail("Jalview did not exit after EPS generation (try running test again to verify - timeout at 9000ms). ["
+          Assert.fail("Jalview did not exit after EPS generation (try running test again to verify - timeout at 9000ms). ["
                   + harg + "]");
         }
       } while (!withAwt);
index 6ea05e6..df5e796 100644 (file)
@@ -1,7 +1,13 @@
 package jalview.commands;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertSame;
+
+import java.util.Map;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
 import jalview.commands.EditCommand.Action;
 import jalview.commands.EditCommand.Edit;
 import jalview.datamodel.Alignment;
@@ -9,12 +15,6 @@ import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 
-import java.util.Map;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
 /**
  * Unit tests for EditCommand
  * 
@@ -30,7 +30,7 @@ public class EditCommandTest
 
   private Alignment al;
 
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     testee = new EditCommand();
@@ -102,8 +102,7 @@ public class EditCommandTest
   /**
    * Test a Paste action, where this adds sequences to an alignment.
    */
-  @Test
-  @Ignore
+  @Test(enabled = false)
   // TODO fix so it works
   public void testPaste_addToAlignment()
   {
index 0e24bf6..c081ced 100644 (file)
@@ -1,13 +1,12 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import jalview.util.MapList;
 
 import java.util.Arrays;
 
-import org.junit.Test;
-
 public class AlignedCodonFrameTest
 {
 
index 671c51d..3e3a46d 100644 (file)
@@ -1,14 +1,13 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import org.testng.annotations.Test;
+import org.testng.Assert;
 import jalview.util.MapList;
 
 import java.util.Iterator;
 
-import org.junit.Test;
-
 /**
  * Unit tests for Mapping$AlignedCodonIterator
  * 
@@ -95,7 +94,7 @@ public class AlignedCodonIteratorTest
     try
     {
       codon = codons.next();
-      fail("expected exception");
+      Assert.fail("expected exception");
     } catch (IncompleteCodonException e)
     {
       // expected
index 60368b1..8391e97 100644 (file)
@@ -1,10 +1,9 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 
 public class AlignedCodonTest
 {
index 7c1aa81..5d67cb7 100644 (file)
@@ -1,10 +1,8 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-import org.junit.Test;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import jalview.analysis.AlignSeq;
 import jalview.io.AppletFormatAdapter;
 
index df98af9..fc73307 100644 (file)
@@ -1,8 +1,10 @@
 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 org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import jalview.io.AppletFormatAdapter;
 import jalview.io.FormatAdapter;
 import jalview.util.MapList;
@@ -10,9 +12,6 @@ import jalview.util.MapList;
 import java.io.IOException;
 import java.util.Iterator;
 
-import org.junit.Before;
-import org.junit.Test;
-
 /**
  * Unit tests for Alignment datamodel.
  * 
@@ -78,7 +77,7 @@ public class AlignmentTest
    * Read in Stockholm format test data including secondary structure
    * annotations.
    */
-  @Before
+  @BeforeMethod
   public void setUp() throws IOException
   {
     al = loadAlignment(TEST_DATA, "STH");
index 97ef079..5e10337 100644 (file)
@@ -1,11 +1,9 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
 import java.util.List;
 
-import org.junit.Test;
-
 public class ColumnSelectionTest
 {
 
index 38c7f51..7e1e9a6 100644 (file)
@@ -1,11 +1,10 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import jalview.util.MapList;
 
-import org.junit.Test;
-
 public class DBRefEntryTest
 {
 
index fe2ff59..8bf036a 100644 (file)
@@ -1,11 +1,9 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
 import java.util.Arrays;
 
-import org.junit.Test;
-
 import jalview.util.MapList;
 
 /**
index 01fb4a1..71f46ee 100644 (file)
@@ -1,20 +1,19 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertTrue;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 
 public class PDBEntryTest
 {
 
-  @Before
+  @BeforeMethod
   public void setUp() throws Exception
   {
   }
 
-  @After
+  @AfterMethod
   public void tearDown() throws Exception
   {
   }
index 15b0314..d0e58ea 100644 (file)
@@ -1,8 +1,7 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
 
 public class SearchResultsTest
 {
index fc0cb0e..b8748b6 100644 (file)
@@ -1,9 +1,9 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
 
-import org.junit.Test;
+import org.testng.annotations.Test;
 
 /**
  * Unit tests for SeqCigar
@@ -125,6 +125,8 @@ public class SeqCigarTest
    *          String
    * @return String
    */
+
+
   protected void testCigar_string(Sequence seq, String ex_cs_gapped)
   {
     SeqCigar c_sgapped = new SeqCigar(seq);
@@ -133,6 +135,7 @@ public class SeqCigarTest
             cs_gapped);
   }
 
+
   protected void testSeqRecovery(SeqCigar gen_sgapped,
           SequenceI s_gapped)
   {
index 5e73bbc..37d39b6 100644 (file)
@@ -1,21 +1,19 @@
 package jalview.datamodel;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import java.util.Arrays;
 import java.util.List;
 
-import org.junit.Before;
-import org.junit.Test;
-
 public class SequenceTest
 {
   SequenceI seq;
 
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     seq = new Sequence("FER1", "AKPNGVL");
index e89245c..9919186 100644 (file)
@@ -1,15 +1,13 @@
 package jalview.datamodel.xdb.embl;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-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 static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import java.io.StringReader;
 import java.util.Vector;
 
-import org.junit.Test;
-
 import jalview.datamodel.DBRefEntry;
 
 public class EmblFileTest
index ae50bdf..87078a9 100644 (file)
  */
 package jalview.ext.jmol;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import java.util.Vector;
 
-import org.junit.Before;
-import org.junit.Test;
-
 import MCview.PDBfile;
 
 import jalview.bin.Cache;
@@ -50,7 +48,7 @@ public class PDBFileWithJmolTest
   // "./examples/DNMT1_MOUSE.pdb"
   // };
 
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
index 3365c52..d4f57d8 100644 (file)
  */
 package jalview.ext.paradise;
 
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.Reader;
 import java.util.Iterator;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.AssertJUnit;
+import org.testng.annotations.Test;
 
 import MCview.PDBfile;
+
 import compbio.util.FileUtil;
 
 import jalview.datamodel.AlignmentI;
@@ -41,7 +43,7 @@ import jalview.io.FormatAdapter;
 public class TestAnnotate3D
 {
 
-  @Test
+  @Test(enabled = false)
   public void test1GIDbyId() throws Exception
   {
     // use same ID as standard tests given at
@@ -51,7 +53,7 @@ public class TestAnnotate3D
     testRNAMLcontent(ids, null);
   }
 
-  @Test
+  @Test(enabled = false)
   public void testIdVsContent2GIS() throws Exception
   {
     Iterator<Reader> ids = Annotate3D.getRNAMLForPDBId("2GIS");
@@ -95,7 +97,7 @@ public class TestAnnotate3D
    * 
    * @throws Exception
    */
-  @Test
+  @Test(enabled = false)
   public void testPDBfileVsRNAML() throws Exception
   {
     PDBfile pdbf = new PDBfile(true, false, true, "examples/2GIS.pdb",
@@ -109,6 +111,7 @@ public class TestAnnotate3D
     testRNAMLcontent(readers, pdbf);
   }
 
+  @Test(enabled = false)
   private void testRNAMLcontent(Iterator<Reader> readers, PDBfile pdbf)
           throws Exception
   {
@@ -152,7 +155,7 @@ public class TestAnnotate3D
             }
             if (struseq == null)
             {
-              Assert.fail("Couldn't find this sequence in original input:\n"
+              AssertJUnit.fail("Couldn't find this sequence in original input:\n"
                       + new FastaFile().print(new SequenceI[]
                       { sq })
                       + "\n\nOriginal input:\n"
index 7dfbba1..fa3b3bc 100644 (file)
@@ -1,16 +1,14 @@
 package jalview.ext.rbvi.chimera;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import java.awt.Color;
 import java.util.Arrays;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.junit.Test;
-
 public class ChimeraCommandsTest
 {
   @Test
index de7235b..b96f4e5 100644 (file)
@@ -1,10 +1,8 @@
 package jalview.ext.rbvi.chimera;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import ext.edu.ucsf.rbvi.strucviz2.ChimeraManager;
 import ext.edu.ucsf.rbvi.strucviz2.StructureManager;
 
index 807d7bb..8786ca5 100644 (file)
@@ -1,11 +1,9 @@
 package jalview.ext.rbvi.chimera;
 
-import static org.junit.Assert.assertTrue;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeClass;
 import jalview.api.structures.JalviewStructureDisplayI;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
index ac7d84d..69ca3a2 100644 (file)
@@ -1,11 +1,9 @@
 package jalview.gui;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-
-import org.junit.Before;
-import org.junit.Test;
-
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.PDBEntry;
@@ -19,7 +17,7 @@ public class AlignViewportTest
   AlignmentI al;
   AlignViewport testee;
 
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     SequenceI seq1 = new Sequence("Seq1", "ABC");
index 33ffd32..6bee4ec 100644 (file)
@@ -1,9 +1,10 @@
 package jalview.gui;
 
-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 org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import java.awt.BorderLayout;
 import java.awt.Checkbox;
 import java.awt.Component;
@@ -16,9 +17,6 @@ import java.util.List;
 import javax.swing.JButton;
 import javax.swing.JPanel;
 
-import org.junit.Before;
-import org.junit.Test;
-
 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
 import jalview.bin.Cache;
 import jalview.datamodel.AlignmentAnnotation;
@@ -52,7 +50,7 @@ public class AnnotationChooserTest
 
   AlignFrame af;
 
-  @Before
+  @BeforeMethod
   public void setUp() throws IOException
   {
     // pin down annotation sort order for test
index 338a48f..0d2d2e8 100644 (file)
@@ -1,11 +1,10 @@
 package jalview.gui;
 
+import org.testng.annotations.Test;
 import java.awt.Canvas;
 import java.awt.Font;
 import java.awt.FontMetrics;
 
-import org.junit.Test;
-
 public class FontChooserTest
 {
 
index e4068d7..745cb2e 100644 (file)
@@ -1,6 +1,7 @@
 package jalview.gui;
 
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import jalview.gui.Help.HelpId;
 
 import java.net.URL;
@@ -9,8 +10,6 @@ import javax.help.HelpSet;
 import javax.help.HelpSetException;
 import javax.help.Map;
 
-import org.junit.Test;
-
 public class HelpTest
 {
   @Test
index b46a52f..3cad6b2 100644 (file)
@@ -20,8 +20,6 @@
  */
 package jalview.gui;
 
-import jalview.bin.Cache;
-
 import java.awt.Dimension;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -35,10 +33,11 @@ import javax.swing.JMenu;
 import javax.swing.JMenuItem;
 import javax.swing.JTextArea;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import jalview.bin.Cache;
 
 public class JAL1353bugdemo
 {
@@ -55,9 +54,7 @@ public class JAL1353bugdemo
 
   volatile boolean finish = false;
 
-  @Test
-  @Ignore
-  // comment out @Ignore to enable this test
+  @Test(enabled = false)
   public void test()
   {
     Cache.initLogger();
index 11e6ea5..868fe38 100644 (file)
@@ -1,11 +1,9 @@
 package jalview.gui;
 
-import static org.junit.Assert.assertEquals;
-
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
 import javax.swing.JScrollBar;
 
-import org.junit.Test;
-
 public class JvSwingUtilsTest
 {
 
index 4595ad1..e06a870 100644 (file)
@@ -1,24 +1,22 @@
 package jalview.gui;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import javax.swing.JInternalFrame;
 import javax.swing.JTextField;
 
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
 public class PDBSearchPanelTest
 {
 
-  @Before
+  @BeforeMethod
   public void setUp() throws Exception
   {
   }
 
-  @After
+  @AfterMethod
   public void tearDown() throws Exception
   {
   }
index 1da7c8c..aff4715 100644 (file)
@@ -1,8 +1,11 @@
 package jalview.gui;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
@@ -14,20 +17,16 @@ import java.util.Map;
 
 import javax.swing.JPanel;
 
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
 public class PaintRefresherTest
 {
   // TODO would prefer PaintRefresher to be a single rather than static
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     PaintRefresher.components.clear();
   }
 
-  @After
+  @AfterMethod
   public void tearDown()
   {
     PaintRefresher.components.clear();
index e1f0708..787171d 100644 (file)
@@ -1,8 +1,8 @@
 package jalview.gui;
 
-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 java.awt.Component;
 import java.io.IOException;
@@ -14,8 +14,8 @@ import javax.swing.JMenuItem;
 import javax.swing.JPopupMenu;
 import javax.swing.JSeparator;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
@@ -41,7 +41,7 @@ public class PopupMenuTest
 
   PopupMenu testee = null;
 
-  @Before
+  @BeforeMethod
   public void setUp() throws IOException
   {
     alignment = new FormatAdapter().readFile(TEST_DATA,
@@ -130,7 +130,7 @@ public class PopupMenuTest
 
     testee.configureReferenceAnnotationsMenu(menu, seqs);
     assertTrue(menu.isEnabled());
-    String expected = "<html><table width=350 border=0><tr><td>Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</td></tr></table></html>";
+    String expected = "<html><table width=350 border=0><tr><td align=justify>Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</td></tr></table></html>";
     assertEquals(expected, menu.getToolTipText());
   }
 
@@ -151,7 +151,7 @@ public class PopupMenuTest
 
     testee.configureReferenceAnnotationsMenu(menu, seqs);
     assertTrue(menu.isEnabled());
-    String expected = "<html><table width=350 border=0><tr><td>Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</td></tr></table></html>";
+    String expected = "<html><table width=350 border=0><tr><td align=justify>Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</td></tr></table></html>";
     assertEquals(expected, menu.getToolTipText());
   }
 
index 2d3db68..192c941 100644 (file)
@@ -1,9 +1,9 @@
 package jalview.gui;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
+import org.testng.Assert;
 import java.awt.Component;
 import java.awt.FlowLayout;
 import java.awt.GridLayout;
@@ -11,8 +11,6 @@ import java.awt.GridLayout;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 
-import org.junit.Test;
-
 public class ProgressBarTest
 {
 
@@ -26,7 +24,7 @@ public class ProgressBarTest
     try
     {
       new ProgressBar(null, null);
-      fail("Expected exception");
+      Assert.fail("Expected exception");
     } catch (NullPointerException e)
     {
       // expected
@@ -41,7 +39,7 @@ public class ProgressBarTest
     try
     {
       new ProgressBar(statusPanel, null);
-      fail("expected exception");
+      Assert.fail("expected exception");
     } catch (IllegalArgumentException e)
     {
       // expected
index 3f8b96a..f01562e 100644 (file)
@@ -1,6 +1,7 @@
 package jalview.gui;
 
-import static org.junit.Assert.assertEquals;
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Sequence;
@@ -9,8 +10,6 @@ import jalview.schemes.ZappoColourScheme;
 
 import java.awt.Color;
 
-import org.junit.Test;
-
 public class SequenceRendererTest
 {
 
index 1e73d3e..6d5af25 100644 (file)
@@ -1,7 +1,10 @@
 package jalview.gui;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import jalview.datamodel.DBRefEntry;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.Sequence;
@@ -9,15 +12,11 @@ import jalview.datamodel.SequenceI;
 
 import java.util.Vector;
 
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
 public class StructureChooserTest
 {
   Sequence seq;
 
-  @Before
+  @BeforeMethod
   public void setUp() throws Exception
   {
     seq = new Sequence("PDB|4kqy|4KQY|A", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1,
@@ -39,7 +38,7 @@ public class StructureChooserTest
     seq.setPDBId(pdbIds);
   }
 
-  @After
+  @AfterMethod
   public void tearDown() throws Exception
   {
     seq = null;
index ef88ca5..576201a 100644 (file)
@@ -1,16 +1,16 @@
 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 static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.io.File;
 
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
 import jalview.bin.Cache;
 import jalview.datamodel.AlignmentAnnotation;
@@ -32,7 +32,7 @@ public class AnnotatedPDBFileInputTest
 
   String pdbId;
 
-  @Before
+  @BeforeMethod
   public void setup() throws Exception
   {
     Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
@@ -60,7 +60,7 @@ 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]);
       }
index 0e066c2..3d911e0 100644 (file)
  */
 package jalview.io;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import jalview.datamodel.AlignmentI;
-import jalview.datamodel.ColumnSelection;
-import jalview.io.AnnotationFile.ViewDef;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.io.File;
 import java.util.Hashtable;
 
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.ColumnSelection;
+import jalview.io.AnnotationFile.ViewDef;
 
 public class AnnotationFileIOTest
 {
@@ -84,7 +85,7 @@ public class AnnotationFileIOTest
     {
       e.printStackTrace();
     }
-    fail("Couln't read the alignment in file '" + f.toString() + "'");
+    Assert.fail("Couln't read the alignment in file '" + f.toString() + "'");
     return null;
   }
 
@@ -98,6 +99,8 @@ public class AnnotationFileIOTest
    *          - label for IO class used to write and read back in the data from
    *          f
    */
+
+  // @Test
   public static void testAnnotationFileIO(String testname, File f,
           File annotFile)
   {
@@ -150,7 +153,7 @@ public class AnnotationFileIOTest
     {
       e.printStackTrace();
     }
-    fail("Test "
+    Assert.fail("Test "
             + testname
             + "\nCouldn't complete Annotation file roundtrip input/output/input test for '"
             + annotFile + "'.");
index ac2b599..619a4e0 100644 (file)
@@ -1,8 +1,5 @@
 package jalview.io;
 
-import jalview.json.binding.v1.BioJSReleasePojo;
-import jalview.json.binding.v1.BioJSRepositoryPojo;
-
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -11,8 +8,12 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.TreeMap;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.AssertJUnit;
+import org.testng.annotations.Test;
+
+import jalview.json.binding.v1.BioJSReleasePojo;
+import jalview.json.binding.v1.BioJSRepositoryPojo;
 
 
 public class BioJsHTMLOutputTest
@@ -43,7 +44,7 @@ public class BioJsHTMLOutputTest
     Assert.assertNotNull(bjsTemplate);
   }
 
-  @Test(expected = NullPointerException.class)
+  @Test(expectedExceptions = NullPointerException.class)
   public void expectedNullPointerException()
   {
     try
@@ -51,7 +52,7 @@ public class BioJsHTMLOutputTest
       BioJsHTMLOutput.refreshBioJSVersionsInfo(null);
     } catch (URISyntaxException e)
     {
-      Assert.fail("Expception occured while testing!");
+      AssertJUnit.fail("Expception occured while testing!");
       e.printStackTrace();
     }
   }
@@ -67,11 +68,11 @@ public class BioJsHTMLOutputTest
       versions = BioJsHTMLOutput.getBioJsMSAVersions();
     } catch (URISyntaxException e)
     {
-      Assert.fail("Expception occured while testing!");
+      AssertJUnit.fail("Expception occured while testing!");
       e.printStackTrace();
     }
-    Assert.assertNotNull("No versions found", versions);
-    Assert.assertTrue("One or more Templates required", versions.size() > 0);
+    AssertJUnit.assertNotNull("No versions found", versions);
+    AssertJUnit.assertTrue("One or more Templates required", versions.size() > 0);
     System.out
             .println("Number of discovered versions : "
             + versions.size());
@@ -83,7 +84,7 @@ public class BioJsHTMLOutputTest
 
     System.out.println("\nCurrent latest version : "
             + BioJsHTMLOutput.getCurrentBJSTemplateFile());
-    Assert.assertNotNull("Latest BioJsMSA version NOT found!",
+    AssertJUnit.assertNotNull("Latest BioJsMSA version NOT found!",
             BioJsHTMLOutput.getCurrentBJSTemplateFile());
 
   }
@@ -92,9 +93,9 @@ public class BioJsHTMLOutputTest
   public void testBioJsUpdate()
   {
     String url = BioJsHTMLOutput.BJS_TEMPLATE_GIT_REPO;
-    Assert.assertTrue("URL not reacable : " + url, urlIsReachable(url));
+    AssertJUnit.assertTrue("URL not reacable : " + url, urlIsReachable(url));
     String response = BioJsHTMLOutput.getURLContentAsString(url);
-    Assert.assertNotNull("Null response read from url!", response);
+    AssertJUnit.assertNotNull("Null response read from url!", response);
     BioJSRepositoryPojo repository = new BioJSRepositoryPojo(response);
     System.out.println(">>> description : " + repository.getDescription());
     System.out
index e9165e2..1f3df1f 100644 (file)
  */
 package jalview.io;
 
-import static org.junit.Assert.*;
-
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeClass;
+import org.testng.AssertJUnit;
 import java.io.File;
 import java.io.IOException;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
 /**
  * @author jimp
  * 
@@ -68,9 +66,9 @@ public class FileIOTester
 
   private void assertValidFormat(String fmt, String src, FileParse fp)
   {
-    assertTrue("Couldn't resolve " + src + " as a valid file", fp.isValid());
+    AssertJUnit.assertTrue("Couldn't resolve " + src + " as a valid file", fp.isValid());
     String type = new IdentifyFile().Identify(fp);
-    assertTrue("Data from '" + src + "' Expected to be '" + fmt
+    AssertJUnit.assertTrue("Data from '" + src + "' Expected to be '" + fmt
             + "' identified as '" + type + "'", type.equalsIgnoreCase(fmt));
   }
 
index 59a5b68..eca3984 100644 (file)
@@ -2,14 +2,12 @@ package jalview.io;
 
 import static org.junit.Assert.fail;
 
-import org.junit.Ignore;
-import org.junit.Test;
+import org.testng.annotations.Test;
 
 public class HtmlFileTest
 {
 
-  @Test
-  @Ignore
+  @Test(enabled = false)
   public void test()
   {
     fail("Not yet implemented");
index 92b172c..ec3f77b 100644 (file)
@@ -1,7 +1,11 @@
 package jalview.io;
 
 
-import static org.junit.Assert.assertNotNull;
+import static org.testng.AssertJUnit.assertNotNull;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.AssertJUnit;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
@@ -19,11 +23,6 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
 public class JSONFileTest
 {
 
@@ -43,7 +42,7 @@ public class JSONFileTest
   HashMap<String, AlignmentAnnotation> testAnnots = new HashMap<String, AlignmentAnnotation>();
   HashMap<String, SequenceGroup> testGrps = new HashMap<String, SequenceGroup>();
 
-  @Before
+  @BeforeMethod
   public void setup() throws Exception
   {
     // create and add sequences
@@ -146,7 +145,7 @@ public class JSONFileTest
     TEST_ANOT_HEIGHT = testAnnots.size();
   }
 
-  @After
+  @AfterMethod
   public void tearDown() throws Exception
   {
   }
@@ -171,34 +170,34 @@ public class JSONFileTest
     for (SequenceI seq : al.getSequences())
     {
       SequenceI expectedSeq = testSeqs.get(seq.getName());
-      Assert.assertTrue("Failed Sequence Test  for >>> " + seq.getName(),
+      AssertJUnit.assertTrue("Failed Sequence Test  for >>> " + seq.getName(),
               isSeqMatched(expectedSeq, seq));
       passedCount++;
     }
-    Assert.assertEquals("Some Sequences did not pass the test",
+    AssertJUnit.assertEquals("Some Sequences did not pass the test",
             TEST_SEQ_HEIGHT, passedCount);
 
     passedCount = 0;
     for (SequenceGroup seqGrp : al.getGroups())
     {
       SequenceGroup expectedGrp = testGrps.get(seqGrp.getName());
-      Assert.assertTrue(
+      AssertJUnit.assertTrue(
               "Failed SequenceGroup Test for >>> " + seqGrp.getName(),
               isGroupMatched(expectedGrp, seqGrp));
       passedCount++;
     }
-    Assert.assertEquals("Some SequenceGroups did not pass the test",
+    AssertJUnit.assertEquals("Some SequenceGroups did not pass the test",
             TEST_GRP_HEIGHT, passedCount);
 
     passedCount = 0;
     for (AlignmentAnnotation annot : al.getAlignmentAnnotation())
     {
       AlignmentAnnotation expectedAnnot = testAnnots.get(annot.label);
-      Assert.assertTrue("Failed AlignmentAnnotation Test for >>> "
+      AssertJUnit.assertTrue("Failed AlignmentAnnotation Test for >>> "
               + annot.label, isAnnotationMatched(expectedAnnot, annot));
       passedCount++;
     }
-    Assert.assertEquals("Some Sequences did not pass the test",
+    AssertJUnit.assertEquals("Some Sequences did not pass the test",
             TEST_ANOT_HEIGHT, passedCount);
 
     // af = new AlignFrame(al, 700, 500);
index 771250b..b3e37f4 100644 (file)
  */
 package jalview.io;
 
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.io.File;
 
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.AssertJUnit;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
 
 import jalview.api.AlignmentViewPanel;
 import jalview.api.ViewStyleI;
@@ -305,7 +305,7 @@ public class Jalview2xmlTests
           }
           catch (NullPointerException q)
           {
-            fail("Mismatch of alignment annotations at position " + p
+            Assert.fail("Mismatch of alignment annotations at position " + p
                     + " Ref seq ann: " + refan.annotations[p]
                     + " alignment " + alaa.annotations[p]);
           }
@@ -320,7 +320,7 @@ public class Jalview2xmlTests
   {
     AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
             "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
-    Assert.assertTrue("Didn't read in the example file correctly.", af != null);
+    assertTrue("Didn't read in the example file correctly.", af != null);
     AlignmentViewPanel sps = null, groups = null;
     for (AlignmentViewPanel ap : af.alignPanel.alignFrame.getAlignPanels())
     {
@@ -338,10 +338,10 @@ public class Jalview2xmlTests
 
     ViewStyleI structureStyle = sps.getAlignViewport().getViewStyle();
     ViewStyleI groupStyle = groups.getAlignViewport().getViewStyle();
-    Assert.assertFalse(structureStyle.sameStyle(groupStyle));
+    AssertJUnit.assertFalse(structureStyle.sameStyle(groupStyle));
 
     groups.getAlignViewport().setViewStyle(structureStyle);
-    Assert.assertFalse(groupStyle.sameStyle(groups.getAlignViewport()
+    AssertJUnit.assertFalse(groupStyle.sameStyle(groups.getAlignViewport()
             .getViewStyle()));
     Assert.assertTrue(structureStyle.sameStyle(groups.getAlignViewport()
             .getViewStyle()));
index bd0bb52..ee731e8 100644 (file)
  */
 package jalview.io;
 
-import static org.junit.Assert.*;
-
+import org.testng.annotations.Factory;
+import static org.testng.ConversionUtils.wrapDataProvider;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeClass;
+import org.testng.Assert;
+import org.testng.AssertJUnit;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Iterator;
@@ -33,21 +38,21 @@ import jalview.datamodel.SequenceI;
 import jalview.datamodel.SequenceNode;
 
 import org.jmol.util.ArrayUtil;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 /**
  * @author jimp
  * 
  */
-@RunWith(Parameterized.class)
 public class NewickFileTests
 {
 
+  @Factory
+  public static Object[] factoryData()
+  {
+    return wrapDataProvider(NewickFileTests.class, data());
+  }
+
   @Parameters
   public static Collection data()
   {
@@ -95,30 +100,30 @@ public class NewickFileTests
       System.out.println(treename + "\n" + testTree);
       NewickFile nf = new NewickFile(testTree, FormatAdapter.PASTE);
       nf.parse();
-      assertTrue(stage + "Invalid Tree '" + nf.getWarningMessage() + "'",
+      AssertJUnit.assertTrue(stage + "Invalid Tree '" + nf.getWarningMessage() + "'",
               nf.isValid());
       SequenceNode tree = nf.getTree();
-      assertTrue(stage + "Null Tree", tree != null);
+      AssertJUnit.assertTrue(stage + "Null Tree", tree != null);
       stage = "Creating newick file from testTree " + treename;
       String gentree = new NewickFile(tree).print(nf.HasBootstrap(),
               nf.HasDistances());
-      assertTrue(stage + "Empty string generated", gentree != null
+      AssertJUnit.assertTrue(stage + "Empty string generated", gentree != null
               && gentree.trim().length() > 0);
       stage = "Parsing regenerated testTree " + treename;
       NewickFile nf_regen = new NewickFile(gentree, FormatAdapter.PASTE);
       nf_regen.parse();
-      assertTrue(
+      AssertJUnit.assertTrue(
               stage + "Newick file is invalid ('"
                       + nf_regen.getWarningMessage() + "')",
               nf_regen.isValid());
       SequenceNode tree_regen = nf.getTree();
-      assertTrue(stage + "Null Tree", tree_regen != null);
+      AssertJUnit.assertTrue(stage + "Null Tree", tree_regen != null);
       stage = "Compare original and generated tree" + treename;
 
       Vector oseqs, nseqs;
       oseqs = new NJTree(new SequenceI[0], nf).findLeaves(nf.getTree(),
               new Vector());
-      assertTrue(stage + "No nodes in original tree.", oseqs.size() > 0);
+      AssertJUnit.assertTrue(stage + "No nodes in original tree.", oseqs.size() > 0);
       SequenceI[] olsqs = new SequenceI[oseqs.size()];
       for (int i = 0, iSize = oseqs.size(); i < iSize; i++)
       {
@@ -126,13 +131,13 @@ public class NewickFileTests
       }
       nseqs = (Vector) new NJTree(new SequenceI[0], nf_regen).findLeaves(
               nf_regen.getTree(), new Vector());
-      assertTrue(stage + "No nodes in regerated tree.", nseqs.size() > 0);
+      AssertJUnit.assertTrue(stage + "No nodes in regerated tree.", nseqs.size() > 0);
       SequenceI[] nsqs = new SequenceI[nseqs.size()];
       for (int i = 0, iSize = nseqs.size(); i < iSize; i++)
       {
         nsqs[i] = (SequenceI) ((SequenceNode) nseqs.get(i)).element();
       }
-      assertTrue(stage + " Different number of leaves (original "
+      AssertJUnit.assertTrue(stage + " Different number of leaves (original "
               + olsqs.length + " and regen " + nsqs.length + ")",
               olsqs.length == nsqs.length);
       SequenceIdMatcher omatcher = new SequenceIdMatcher(olsqs), nmatcher = new SequenceIdMatcher(
@@ -157,7 +162,7 @@ public class NewickFileTests
 
       if (warns.length() > 0)
       {
-        fail(stage + warns);
+        Assert.fail(stage + warns);
       }
     } catch (Exception x)
     {
index e411272..2fd8e20 100644 (file)
@@ -1,15 +1,16 @@
 package jalview.io;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import jalview.datamodel.Alignment;
-import jalview.datamodel.SequenceI;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.junit.Test;
+import org.testng.annotations.Test;
+
+import jalview.datamodel.Alignment;
+import jalview.datamodel.SequenceI;
 
 /**
  * Test file for {@link PhylipFile}.
index c7e6398..a838cf7 100644 (file)
  */
 package jalview.io;
 
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeClass;
 import java.io.File;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
 public class RNAMLfileTest
 {
 
index 806e4dc..12a8e9c 100644 (file)
  */
 package jalview.io;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import jalview.datamodel.Alignment;
-import jalview.datamodel.AlignmentAnnotation;
-import jalview.datamodel.AlignmentI;
-import jalview.datamodel.Annotation;
-import jalview.datamodel.SequenceFeature;
-import jalview.datamodel.SequenceI;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.io.File;
 import java.util.BitSet;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.junit.Test;
+import org.testng.annotations.Test;
+
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceI;
 
 public class StockholmFileTest
 {
@@ -84,6 +85,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)
   {
index edf7f20..df4b660 100644 (file)
@@ -20,7 +20,8 @@
  */
 package jalview.io;
 
-import static org.junit.Assert.*;
+import org.testng.annotations.Test;
+import org.testng.AssertJUnit;
 import jalview.io.TCoffeeScoreFile.Block;
 import jalview.io.TCoffeeScoreFile.Header;
 
@@ -31,7 +32,6 @@ import java.util.List;
 
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.junit.Test;
 import org.xml.sax.SAXException;
 
 import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax;
@@ -54,23 +54,23 @@ public class TCoffeeScoreFileTest
 
     TCoffeeScoreFile scoreFile = new TCoffeeScoreFile(SCORE_FILE.getPath(),
             AppletFormatAdapter.FILE);
-    assertTrue(scoreFile.getWarningMessage(), scoreFile.isValid());
+    AssertJUnit.assertTrue(scoreFile.getWarningMessage(), scoreFile.isValid());
 
     Header header = scoreFile.header;
-    assertNotNull(header);
-    assertEquals(
+    AssertJUnit.assertNotNull(header);
+    AssertJUnit.assertEquals(
             "T-COFFEE, Version_9.02.r1228 (2012-02-16 18:15:12 - Revision 1228 - Build 336)",
             header.head);
-    assertEquals(90, header.score);
-    assertEquals(89, header.getScoreFor("1PHT"));
-    assertEquals(90, header.getScoreFor("1BB9"));
-    assertEquals(94, header.getScoreFor("1UHC"));
-    assertEquals(94, header.getScoreFor("1YCS"));
-    assertEquals(93, header.getScoreFor("1OOT"));
-    assertEquals(94, header.getScoreFor("1ABO"));
-    assertEquals(94, header.getScoreFor("1FYN"));
-    assertEquals(94, header.getScoreFor("1QCF"));
-    assertEquals(90, header.getScoreFor("cons"));
+    AssertJUnit.assertEquals(90, header.score);
+    AssertJUnit.assertEquals(89, header.getScoreFor("1PHT"));
+    AssertJUnit.assertEquals(90, header.getScoreFor("1BB9"));
+    AssertJUnit.assertEquals(94, header.getScoreFor("1UHC"));
+    AssertJUnit.assertEquals(94, header.getScoreFor("1YCS"));
+    AssertJUnit.assertEquals(93, header.getScoreFor("1OOT"));
+    AssertJUnit.assertEquals(94, header.getScoreFor("1ABO"));
+    AssertJUnit.assertEquals(94, header.getScoreFor("1FYN"));
+    AssertJUnit.assertEquals(94, header.getScoreFor("1QCF"));
+    AssertJUnit.assertEquals(90, header.getScoreFor("cons"));
   }
 
   @Test
@@ -80,10 +80,10 @@ public class TCoffeeScoreFileTest
     {
       TCoffeeScoreFile result = new TCoffeeScoreFile(ALIGN_FILE.getPath(),
               FormatAdapter.FILE);
-      assertFalse(result.isValid());
+      AssertJUnit.assertFalse(result.isValid());
     } catch (IOException x)
     {
-      assertTrue("File not found exception thrown",
+      AssertJUnit.assertTrue("File not found exception thrown",
               x instanceof FileNotFoundException);
     }
   }
@@ -93,9 +93,9 @@ public class TCoffeeScoreFileTest
   {
     TCoffeeScoreFile result = new TCoffeeScoreFile(SCORE_FILE.getPath(),
             FormatAdapter.FILE);
-    assertTrue(result.isValid());
-    assertEquals(8, result.getHeight());
-    assertEquals(83, result.getWidth());
+    AssertJUnit.assertTrue(result.isValid());
+    AssertJUnit.assertEquals(8, result.getHeight());
+    AssertJUnit.assertEquals(83, result.getWidth());
   }
 
   @Test
@@ -116,24 +116,24 @@ public class TCoffeeScoreFileTest
     FileParse source = new FileParse(BLOCK, FormatAdapter.PASTE);
     Block block = TCoffeeScoreFile.readBlock(source, 0);
 
-    assertNotNull(block);
-    assertEquals("999999999999999999999999998762112222543211112134",
+    AssertJUnit.assertNotNull(block);
+    AssertJUnit.assertEquals("999999999999999999999999998762112222543211112134",
             block.getScoresFor("1PHT"));
-    assertEquals("99999999999999999999999999987-------4322----2234",
+    AssertJUnit.assertEquals("99999999999999999999999999987-------4322----2234",
             block.getScoresFor("1BB9"));
-    assertEquals("99999999999999999999999999987-------5321----2246",
+    AssertJUnit.assertEquals("99999999999999999999999999987-------5321----2246",
             block.getScoresFor("1UHC"));
-    assertEquals("99999999999999999999999999986-------4321----1-35",
+    AssertJUnit.assertEquals("99999999999999999999999999986-------4321----1-35",
             block.getScoresFor("1YCS"));
-    assertEquals("999999999999999999999999999861-------3------1135",
+    AssertJUnit.assertEquals("999999999999999999999999999861-------3------1135",
             block.getScoresFor("1OOT"));
-    assertEquals("99999999999999999999999999986-------422-------34",
+    AssertJUnit.assertEquals("99999999999999999999999999986-------422-------34",
             block.getScoresFor("1ABO"));
-    assertEquals("99999999999999999999999999985-------32--------35",
+    AssertJUnit.assertEquals("99999999999999999999999999985-------32--------35",
             block.getScoresFor("1FYN"));
-    assertEquals("99999999999999999999999999974-------2---------24",
+    AssertJUnit.assertEquals("99999999999999999999999999974-------2---------24",
             block.getScoresFor("1QCF"));
-    assertEquals("999999999999999999999999999851000110321100001134",
+    AssertJUnit.assertEquals("999999999999999999999999999851000110321100001134",
             block.getConsensus());
   }
 
@@ -144,31 +144,31 @@ public class TCoffeeScoreFileTest
     TCoffeeScoreFile parser = new TCoffeeScoreFile(SCORE_FILE.getPath(),
             FormatAdapter.FILE);
 
-    assertEquals(
+    AssertJUnit.assertEquals(
             "999999999999999999999999998762112222543211112134----------5666642367889999999999889",
             parser.getScoresFor("1PHT"));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999987-------4322----22341111111111676653-355679999999999889",
             parser.getScoresFor("1BB9"));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999987-------5321----2246----------788774--66789999999999889",
             parser.getScoresFor("1UHC"));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999986-------4321----1-35----------78777--356789999999999889",
             parser.getScoresFor("1YCS"));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "999999999999999999999999999861-------3------1135----------78877--356789999999997-67",
             parser.getScoresFor("1OOT"));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999986-------422-------34----------687774--56779999999999889",
             parser.getScoresFor("1ABO"));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999985-------32--------35----------6888842356789999999999889",
             parser.getScoresFor("1FYN"));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999974-------2---------24----------6878742356789999999999889",
             parser.getScoresFor("1QCF"));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999985100011032110000113400100000006877641356789999999999889",
             parser.getScoresFor("cons"));
   }
@@ -179,33 +179,33 @@ public class TCoffeeScoreFileTest
 
     TCoffeeScoreFile parser = new TCoffeeScoreFile(SCORE_FILE.getPath(),
             FormatAdapter.FILE);
-    assertTrue(parser.getWarningMessage(), parser.isValid());
+    AssertJUnit.assertTrue(parser.getWarningMessage(), parser.isValid());
     List<String> scores = parser.getScoresList();
-    assertEquals(
+    AssertJUnit.assertEquals(
             "999999999999999999999999998762112222543211112134----------5666642367889999999999889",
             scores.get(0));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999987-------4322----22341111111111676653-355679999999999889",
             scores.get(1));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999987-------5321----2246----------788774--66789999999999889",
             scores.get(2));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999986-------4321----1-35----------78777--356789999999999889",
             scores.get(3));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "999999999999999999999999999861-------3------1135----------78877--356789999999997-67",
             scores.get(4));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999986-------422-------34----------687774--56779999999999889",
             scores.get(5));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999985-------32--------35----------6888842356789999999999889",
             scores.get(6));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999974-------2---------24----------6878742356789999999999889",
             scores.get(7));
-    assertEquals(
+    AssertJUnit.assertEquals(
             "99999999999999999999999999985100011032110000113400100000006877641356789999999999889",
             scores.get(8));
 
@@ -217,28 +217,28 @@ public class TCoffeeScoreFileTest
 
     TCoffeeScoreFile parser = new TCoffeeScoreFile(SCORE_FILE.getPath(),
             FormatAdapter.FILE);
-    assertTrue(parser.getWarningMessage(), parser.isValid());
+    AssertJUnit.assertTrue(parser.getWarningMessage(), parser.isValid());
     byte[][] scores = parser.getScoresArray();
 
-    assertEquals(9, scores[0][0]);
-    assertEquals(9, scores[1][0]);
-    assertEquals(9, scores[2][0]);
-    assertEquals(9, scores[3][0]);
-    assertEquals(9, scores[4][0]);
-    assertEquals(9, scores[5][0]);
-    assertEquals(9, scores[6][0]);
-    assertEquals(9, scores[7][0]);
-    assertEquals(9, scores[8][0]);
-
-    assertEquals(5, scores[0][36]);
-    assertEquals(4, scores[1][36]);
-    assertEquals(5, scores[2][36]);
-    assertEquals(4, scores[3][36]);
-    assertEquals(-1, scores[4][36]);
-    assertEquals(4, scores[5][36]);
-    assertEquals(3, scores[6][36]);
-    assertEquals(2, scores[7][36]);
-    assertEquals(3, scores[8][36]);
+    AssertJUnit.assertEquals(9, scores[0][0]);
+    AssertJUnit.assertEquals(9, scores[1][0]);
+    AssertJUnit.assertEquals(9, scores[2][0]);
+    AssertJUnit.assertEquals(9, scores[3][0]);
+    AssertJUnit.assertEquals(9, scores[4][0]);
+    AssertJUnit.assertEquals(9, scores[5][0]);
+    AssertJUnit.assertEquals(9, scores[6][0]);
+    AssertJUnit.assertEquals(9, scores[7][0]);
+    AssertJUnit.assertEquals(9, scores[8][0]);
+
+    AssertJUnit.assertEquals(5, scores[0][36]);
+    AssertJUnit.assertEquals(4, scores[1][36]);
+    AssertJUnit.assertEquals(5, scores[2][36]);
+    AssertJUnit.assertEquals(4, scores[3][36]);
+    AssertJUnit.assertEquals(-1, scores[4][36]);
+    AssertJUnit.assertEquals(4, scores[5][36]);
+    AssertJUnit.assertEquals(3, scores[6][36]);
+    AssertJUnit.assertEquals(2, scores[7][36]);
+    AssertJUnit.assertEquals(3, scores[8][36]);
 
   }
 
@@ -247,9 +247,9 @@ public class TCoffeeScoreFileTest
   {
     String file = "test/jalview/io/tcoffee.score_ascii_with_residue_numbers";
     TCoffeeScoreFile result = new TCoffeeScoreFile(file, FormatAdapter.FILE);
-    assertTrue(result.isValid());
-    assertEquals(5, result.getHeight());
-    assertEquals(84, result.getWidth());
+    AssertJUnit.assertTrue(result.isValid());
+    AssertJUnit.assertEquals(5, result.getHeight());
+    AssertJUnit.assertEquals(84, result.getWidth());
   }
 
 }
index 42f17fd..d84f567 100644 (file)
  */
 package jalview.schemes;
 
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import java.util.Map;
 
-import org.junit.Test;
-
 public class DnaCodonTests
 {
 
index b82d338..429323b 100644 (file)
@@ -1,13 +1,11 @@
 package jalview.schemes;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import java.util.Collections;
 import java.util.List;
 
-import org.junit.Test;
-
 public class ResiduePropertiesTest
 {
 
index 89f9f8a..5868210 100644 (file)
  */
 package jalview.schemes;
 
+import org.testng.annotations.Test;
 import jalview.api.analysis.ScoreModelI;
 
 import java.util.Map;
 
-import org.junit.Test;
-
 public class ScoreMatrixPrinter
 {
   @Test
index cc8138c..74dddb4 100644 (file)
@@ -1,12 +1,11 @@
 package jalview.structure;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
 
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.AssertJUnit;
+import org.testng.annotations.Test;
 
 import MCview.PDBfile;
 
@@ -28,11 +27,10 @@ public class Mapping
    * 115 in PDB Res Numbering secondary structure numbers in jmol seem to be in
    * msd numbering, not pdb res numbering.
    */
-  @Test
-  @Ignore
+  @Test(enabled = false)
   public void pdbEntryPositionMap() throws Exception
   {
-    fail("This test intentionally left to fail");
+    Assert.fail("This test intentionally left to fail");
     for (int offset = 0; offset < 20; offset += 6)
     {
       // check we put the secondary structure in the right position
@@ -111,11 +109,10 @@ public class Mapping
     }
   }
 
-  @Test
-  @Ignore
+  @Test(enabled = false)
   public void testPDBentryMapping() throws Exception
   {
-    fail("This test intentionally left to fail");
+    Assert.fail("This test intentionally left to fail");
     Sequence sq = new Sequence(
             "1GAQ A subseq 126 to 219",
             "EIVKGVCSNFLCDLQPGDNVQITGPVGKEMLMPKDPNATIIMLATGTGIAPFRSFLWKMFFEKHDDYKFNGLGWLFLGVPTSSSLLYKEEFGKM");
@@ -228,7 +225,7 @@ public class Mapping
             jalview.io.FormatAdapter.FILE);
     if (pmap == null)
     {
-      Assert.fail("Couldn't make a mapping for 3W5V to FER1_MAIZE");
+      AssertJUnit.fail("Couldn't make a mapping for 3W5V to FER1_MAIZE");
     }
   }
 
index 487ef2c..62a9f43 100644 (file)
@@ -1,20 +1,19 @@
 package jalview.structure;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import jalview.datamodel.AlignedCodonFrame;
 
 import java.util.HashSet;
 import java.util.Set;
 
-import org.junit.Before;
-import org.junit.Test;
-
 public class StructureSelectionManagerTest
 {
   private StructureSelectionManager ssm;
 
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     ssm = new StructureSelectionManager();
index 3db7f23..4209577 100644 (file)
@@ -1,15 +1,13 @@
 package jalview.structures.models;
 
-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 org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
 import java.util.Arrays;
 import java.util.List;
 
-import org.junit.Before;
-import org.junit.Test;
-
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.PDBEntry;
@@ -57,7 +55,7 @@ public class AAStructureBindingModelTest
   /**
    * Set up test conditions with three aligned sequences,
    */
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     SequenceI seq1 = new Sequence("1YCS", "-VPSQK");
index 3bbcf27..4e2c92e 100644 (file)
@@ -1,12 +1,10 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import java.awt.Color;
 
-import org.junit.Test;
-
 public class ColorUtilsTest
 {
 
index 57d1ac1..0a40784 100644 (file)
@@ -1,11 +1,9 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 
index 959c55d..925a375 100644 (file)
@@ -1,10 +1,11 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import jalview.datamodel.DBRefEntry;
 import jalview.datamodel.DBRefSource;
 import jalview.datamodel.Mapping;
@@ -12,8 +13,6 @@ import jalview.datamodel.PDBEntry;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 
-import org.junit.Test;
-
 public class DBRefUtilsTest
 {
 
index bfb0837..5579efb 100644 (file)
@@ -1,16 +1,15 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertNull;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.testng.annotations.Test;
 
 public class MapListTest
 {
@@ -48,7 +47,7 @@ public class MapListTest
   private static void testLocateFrom(MapList mldna, int i, int j, int[] ks)
   {
     int[] frm = mldna.locateInFrom(i, j);
-    Assert.assertEquals("Failed test locate from " + i + " to " + j,
+    assertEquals("Failed test locate from " + i + " to " + j,
             Arrays.toString(frm), Arrays.toString(ks));
   }
 
index ec9ace4..1bbdc1e 100644 (file)
@@ -1,9 +1,9 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
 import java.awt.Color;
 import java.io.IOException;
 import java.util.Arrays;
@@ -12,8 +12,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-import org.junit.Test;
-
 import jalview.api.AlignViewportI;
 import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Alignment;
index 2293163..7d10758 100644 (file)
@@ -1,13 +1,12 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.util.Arrays;
 
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
 public class QuickSortTest
 {
@@ -24,7 +23,7 @@ public class QuickSortTest
   private final Object[] sortedThings = new Object[]
   { c4, c2, c1, c3 };
 
-  @Before
+  @BeforeMethod
   public void setUp()
   {
     things = new Object[]
@@ -82,8 +81,7 @@ public class QuickSortTest
   /**
    * Test whether sort is stable i.e. equal values retain their mutual ordering.
    */
-  @Test
-  @Ignore
+  @Test(enabled = false)
   public void testSort_withDuplicates()
   {
     int[] values = new int[]
index f680d6c..fa240d5 100644 (file)
@@ -1,13 +1,11 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import java.util.Arrays;
 import java.util.List;
 
-import org.junit.Test;
-
 public class ShiftListTest
 {
 
index 6930e40..0a0fac0 100644 (file)
@@ -1,13 +1,11 @@
 package jalview.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import java.util.Arrays;
 
-import org.junit.Test;
-
 public class StringUtilsTest
 {
 
index 115c5d3..32003c2 100644 (file)
@@ -1,16 +1,14 @@
 package jalview.viewmodel.styles;
 
-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 org.testng.annotations.Test;
+import org.testng.AssertJUnit;
 import java.awt.Color;
 import java.lang.reflect.Field;
 import java.util.Random;
 
-import org.junit.Assert;
-import org.junit.Test;
-
 
 public class ViewStyleTest
 {
@@ -137,7 +135,7 @@ public class ViewStyleTest
     }
     else
     {
-      Assert.fail("Unhandled field type (add to test): " + field.getName()
+      AssertJUnit.fail("Unhandled field type (add to test): " + field.getName()
               + ":" + type);
     }
   }
index 778fc18..9ecf524 100644 (file)
  */
 package jalview.ws;
 
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.util.List;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
 import jalview.bin.Cache;
 import jalview.datamodel.AlignmentI;
@@ -37,7 +37,7 @@ public class PDBSequenceFetcherTest
 
   SequenceFetcher sf;
 
-  @Before
+  @BeforeMethod
   public void setUp() throws Exception
   {
     // ensure 'add annotation from structure' is selected
@@ -49,7 +49,7 @@ public class PDBSequenceFetcherTest
     sf = new SequenceFetcher(false);
   }
 
-  @Test
+  @Test(enabled = false)
   public void testRnaSeqRetrieve() throws Exception
   {
     List<DbSourceProxy> sps = sf.getSourceProxy("PDB");
index a97f3e0..f92a32e 100644 (file)
@@ -1,8 +1,11 @@
 package jalview.ws.dbsources;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.Assert;
 import jalview.ws.dbsources.PDBRestClient.PDBDocField;
 import jalview.ws.uimodel.PDBRestRequest;
 import jalview.ws.uimodel.PDBRestResponse;
@@ -20,10 +23,6 @@ import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
 import org.json.simple.parser.ParseException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
 import com.sun.jersey.api.client.Client;
 import com.sun.jersey.api.client.ClientResponse;
 import com.sun.jersey.api.client.WebResource;
@@ -33,12 +32,12 @@ import com.sun.jersey.api.client.config.DefaultClientConfig;
 public class PDBRestClientTest
 {
 
-  @Before
+  @BeforeMethod
   public void setUp() throws Exception
   {
   }
 
-  @After
+  @AfterMethod
   public void tearDown() throws Exception
   {
   }
@@ -67,7 +66,7 @@ public class PDBRestClientTest
     } catch (Exception e)
     {
       e.printStackTrace();
-      fail("Couldn't execute webservice call!");
+      Assert.fail("Couldn't execute webservice call!");
       return;
     }
     assertTrue(response.getNumberOfItemsFound() > 99);
@@ -130,7 +129,7 @@ public class PDBRestClientTest
     assertEquals(expectedErrorMsg, parsedErrorResponse);
   }
 
-  @Test(expected = Exception.class)
+  @Test(expectedExceptions = Exception.class)
   public void testForExpectedRuntimeException() throws Exception
   {
     List<PDBDocField> wantedFields = new ArrayList<PDBDocField>();
@@ -207,7 +206,7 @@ public class PDBRestClientTest
     // Check the response status and report exception if one occurs
     if (clientResponse.getStatus() != 200)
     {
-      fail("Webservice call failed!!!");
+      Assert.fail("Webservice call failed!!!");
     }
     else
     {
@@ -248,7 +247,7 @@ public class PDBRestClientTest
         }
       } catch (ParseException e)
       {
-        fail(">>>  Test failed due to exception while parsing pdb response json !!!");
+        Assert.fail(">>>  Test failed due to exception while parsing pdb response json !!!");
         e.printStackTrace();
       }
     }
index 7325527..60a1111 100644 (file)
@@ -1,14 +1,12 @@
 package jalview.ws.dbsources;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+import org.testng.annotations.Test;
 import java.io.Reader;
 import java.io.StringReader;
 import java.util.Vector;
 
-import org.junit.Test;
-
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.UniprotEntry;
index 4c67d25..5ff4aed 100644 (file)
@@ -30,9 +30,8 @@ import java.util.List;
 import javax.swing.JFrame;
 import javax.swing.JPanel;
 
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
 
 import compbio.metadata.Preset;
 import compbio.metadata.PresetManager;
@@ -74,8 +73,8 @@ public class Jws2ParamView
    * This test marked Ignore as it appears to need user action to complete
    * rather than hang
    */
-  @Test
-  @Ignore
+
+  @Test(enabled = false)
   public void testJws2Gui()
   {
     Iterator<String> presetEnum = presetTests.iterator();
index e561479..c184722 100644 (file)
  */
 package jalview.ws.jabaws;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeClass;
+import org.testng.Assert;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.io.AnnotationFile;
@@ -35,10 +38,6 @@ import jalview.ws.jws2.jabaws2.Jws2Instance;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
 public class DisorderAnnotExportImport
 {
   public static String testseqs = "examples/uniref50.fa";
@@ -157,7 +156,7 @@ public class DisorderAnnotExportImport
     {
       e.printStackTrace();
     }
-    fail("Test "
+    Assert.fail("Test "
             + testname
             + "\nCouldn't complete Annotation file roundtrip input/output/input test.");
   }
index 72fa7a4..546ba90 100644 (file)
@@ -25,10 +25,9 @@ import static org.junit.Assert.fail;
 
 import java.util.Vector;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
 
 import jalview.ws.jws2.Jws2Discoverer;
 
@@ -52,8 +51,7 @@ public class JalviewJabawsTestUtils
   { "http://localhost:8080/jabaws",
       "http://www.compbio.dundee.ac.uk/jabaws" };
 
-  @Test
-  @Ignore
+  @Test(enabled = false)
   public void testAnnotExport()
   {
     fail("Not yet implemented");
index 7afaeed..0b17169 100644 (file)
@@ -20,9 +20,8 @@
  */
 package jalview.ws.jabaws;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.awt.Component;
 import java.util.ArrayList;
@@ -31,9 +30,10 @@ import java.util.List;
 import javax.swing.JMenu;
 import javax.swing.JMenuItem;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
 
 import compbio.metadata.Argument;
 import compbio.metadata.WrongParameterException;
@@ -82,7 +82,7 @@ public class JpredJabaStructExportImport
 
     if (jpredws == null)
     {
-      fail("jpredws is null");
+      Assert.fail("jpredws is null");
     }
 
     jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
@@ -144,7 +144,7 @@ public class JpredJabaStructExportImport
         if (!success)
         {
           jpredClient.cancelCurrentJob();
-          fail("Jpred Client didn't run with hardwired default parameters.");
+          Assert.fail("Jpred Client didn't run with hardwired default parameters.");
         }
 
       } catch (InterruptedException x)
@@ -221,15 +221,15 @@ public class JpredJabaStructExportImport
     {
       e.printStackTrace();
     }
-    fail("Test "
+    Assert.fail("Test "
             + testname
             + "\nCouldn't complete Annotation file roundtrip input/output/input test.");
   }
 
-  // @Test
+  @Test
   public void testJpredwsSettingsRecovery()
   {
-    fail("not implemnented");
+    Assert.fail("not implemnented");
     List<compbio.metadata.Argument> opts = new ArrayList<compbio.metadata.Argument>();
     for (compbio.metadata.Argument rg : (List<compbio.metadata.Argument>) jpredws
             .getRunnerConfig().getArguments())
@@ -241,7 +241,7 @@ public class JpredJabaStructExportImport
           rg.setValue("292");
         } catch (WrongParameterException q)
         {
-          fail("Couldn't set the temperature parameter "
+          Assert.fail("Couldn't set the temperature parameter "
                   + q.getStackTrace());
         }
         opts.add(rg);
index 0c25cdb..244ee4f 100644 (file)
@@ -1,13 +1,11 @@
 package jalview.ws.jabaws;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
+import org.testng.Assert;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.junit.Test;
-
 import compbio.data.msa.MsaWS;
 import compbio.data.msa.RegistryWS;
 import compbio.data.sequence.FastaSequence;
@@ -39,7 +37,7 @@ public class MinJabawsClientTests {
                                }
                        }
                        if (msaservice == null) {
-                               fail("couldn't find a clustalO service on the public registry");
+                               Assert.fail("couldn't find a clustalO service on the public registry");
                        }
                        FastaSequence fsq = new FastaSequence("seqA",
                                        "SESESESESESESESSESESSESESESESESESESESESEEEEEESSESESESESSSSESESESESESESE");
index 1475b4e..6b92b85 100644 (file)
  */
 package jalview.ws.jabaws;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+import java.awt.Component;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import compbio.metadata.WrongParameterException;
+
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.gui.Jalview2XML;
@@ -35,20 +49,6 @@ import jalview.ws.jws2.SequenceAnnotationWSClient;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
 import jalview.ws.params.AutoCalcSetting;
 
-import java.awt.Component;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import compbio.metadata.WrongParameterException;
-
 public class RNAStructExportImport
 {
   public static String testseqs = "examples/RF00031_folded.stk";
@@ -81,7 +81,7 @@ public class RNAStructExportImport
 
     if (rnaalifoldws == null)
     {
-      fail("no web service");
+      Assert.fail("no web service");
     }
 
     jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
@@ -144,7 +144,9 @@ public class RNAStructExportImport
       {
         if (aa.isRNA())
         {
-          Assert.assertTrue("Did not create valid structure from RNAALiFold prediction", aa.isValidStruc());
+          assertTrue(
+                  "Did not create valid structure from RNAALiFold prediction",
+                  aa.isValidStruc());
         }
       }
     }
@@ -216,7 +218,7 @@ public class RNAStructExportImport
     {
       e.printStackTrace();
     }
-    fail("Test "
+    Assert.fail("Test "
             + testname
             + "\nCouldn't complete Annotation file roundtrip input/output/input test.");
   }
@@ -235,7 +237,7 @@ public class RNAStructExportImport
           rg.setValue("292");
         } catch (WrongParameterException q)
         {
-          fail("Couldn't set the temperature parameter "
+          Assert.fail("Couldn't set the temperature parameter "
                   + q.getStackTrace());
         }
         opts.add(rg);
index bf1b8ee..d24a790 100644 (file)
  */
 package jalview.ws.jws2;
 
-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 org.testng.annotations.Test;
+import org.testng.annotations.BeforeClass;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
-
 import compbio.metadata.Option;
 import compbio.metadata.Parameter;
 import compbio.metadata.Preset;
index 66cdc42..325febc 100644 (file)
@@ -1,11 +1,9 @@
 package jalview.ws.rest;
 
-import static org.junit.Assert.assertEquals;
-
+import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
 import java.util.Vector;
 
-import org.junit.Test;
-
 import jalview.bin.Cache;
 
 public class RestClientTest
index c4430ad..d562644 100644 (file)
  */
 package jalview.ws.rest;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.util.Map;
 
-import org.junit.Test;
+import org.testng.annotations.Test;
 
 import jalview.gui.AlignFrame;
-import jalview.util.StringUtils;
 
 /**
  * @author jimp
index 7f82252..bac0b5e 100644 (file)
@@ -1,8 +1,7 @@
 package jalview.ws.seqfetcher;
 
-import static org.junit.Assert.*;
-
-import org.junit.Test;
+import org.testng.annotations.Test;
+import org.testng.AssertJUnit;
 
 public class DasSequenceFetcher
 {
@@ -11,7 +10,7 @@ public class DasSequenceFetcher
   public void testDasRegistryContact()
   {
     jalview.bin.Cache.getDasSourceRegistry().refreshSources();
-    assertTrue(
+    AssertJUnit.assertTrue(
             "Expected to find at least one DAS source at the registry. Check config.",
             jalview.bin.Cache.getDasSourceRegistry().getSources().size() > 0);
   }
index 7540edf..302c0f7 100644 (file)
  */
 package jalview.ws.seqfetcher;
 
-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 org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeClass;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
 import jalview.analysis.CrossRef;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.DBRefEntry;
diff --git a/utils/hamcrest-core-1.3.jar b/utils/hamcrest-core-1.3.jar
new file mode 100644 (file)
index 0000000..9d5fe16
Binary files /dev/null and b/utils/hamcrest-core-1.3.jar differ
diff --git a/utils/jalview_testng.xml b/utils/jalview_testng.xml
new file mode 100644 (file)
index 0000000..6ebda65
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="Suite" parallel="none">
+  <test verbose="2" name="Test">
+    <classes>
+      <class name="jalview.gui.AlignViewportTest"/>
+      <class name="jalview.util.ShiftListTest"/>
+      <class name="jalview.util.ColorUtilsTest"/>
+      <class name="jalview.gui.PDBSearchPanelTest"/>
+      <class name="MCview.PDBfileTest"/>
+      <class name="jalview.io.BioJsHTMLOutputTest"/>
+      <class name="jalview.io.JSONFileTest"/>
+      <class name="jalview.ext.jmol.PDBFileWithJmolTest"/>
+      <class name="jalview.ws.jabaws.RNAStructExportImport"/>
+      <class name="jalview.ext.paradise.TestAnnotate3D"/>
+      <class name="MCview.PDBChainTest"/>
+      <class name="jalview.io.StockholmFileTest"/>
+      <class name="jalview.schemes.ScoreMatrixPrinter"/>
+      <class name="jalview.datamodel.SearchResultsTest"/>
+      <class name="jalview.ws.seqfetcher.DasSequenceFetcher"/>
+      <class name="jalview.util.DBRefUtilsTest"/>
+      <class name="jalview.analysis.CrossRefTest"/>
+      <class name="jalview.ws.jabaws.MinJabawsClientTests"/>
+      <class name="jalview.datamodel.AlignedCodonTest"/>
+      <class name="MCview.AtomTest"/>
+      <class name="jalview.gui.PopupMenuTest"/>
+      <class name="jalview.viewmodel.styles.ViewStyleTest"/>
+      <class name="jalview.io.AnnotationFileIOTest"/>
+      <class name="jalview.ws.jws2.ParameterUtilsTest"/>
+      <class name="jalview.io.RNAMLfileTest"/>
+      <class name="jalview.analysis.AlignmentUtilsTests"/>
+      <class name="jalview.gui.SequenceRendererTest"/>
+      <class name="jalview.bin.CommandLineOperations"/>
+      <class name="jalview.gui.PaintRefresherTest"/>
+      <class name="jalview.ws.seqfetcher.DbRefFetcherTest"/>
+      <class name="jalview.datamodel.AlignmentAnnotationTests"/>
+      <class name="jalview.schemes.ResiduePropertiesTest"/>
+      <class name="jalview.ext.rbvi.chimera.ChimeraCommandsTest"/>
+      <class name="MCview.ResidueTest"/>
+      <class name="jalview.io.PhylipFileTests"/>
+      <class name="jalview.util.MappingUtilsTest"/>
+      <class name="jalview.ws.jabaws.DisorderAnnotExportImport"/>
+      <class name="jalview.analysis.GroupingTest"/>
+      <class name="jalview.analysis.AnnotationSorterTest"/>
+      <class name="jalview.io.FileIOTester"/>
+      <class name="jalview.util.MapListTest"/>
+      <class name="jalview.datamodel.ColumnSelectionTest"/>
+      <class name="jalview.ext.rbvi.chimera.ChimeraConnect"/>
+      <class name="jalview.gui.ProgressBarTest"/>
+      <class name="jalview.analysis.AlignmentAnnotationUtilsTest"/>
+      <class name="jalview.structure.StructureSelectionManagerTest"/>
+      <class name="jalview.io.TCoffeeScoreFileTest"/>
+      <class name="jalview.analysis.AAFrequencyTest"/>
+      <class name="jalview.ws.dbsources.PDBRestClientTest"/>
+      <class name="jalview.analysis.DnaTest"/>
+      <class name="jalview.util.StringUtilsTest"/>
+      <class name="jalview.structures.models.AAStructureBindingModelTest"/>
+      <class name="jalview.gui.JvSwingUtilsTest"/>
+      <class name="jalview.analysis.CodingUtilsTest"/>
+      <class name="jalview.io.AnnotatedPDBFileInputTest"/>
+      <class name="jalview.ws.rest.ShmmrRSBSService"/>
+      <class name="jalview.io.NewickFileTests"/>
+      <class name="jalview.analysis.ParsePropertiesTest"/>
+      <class name="MCview.BondTest"/>
+      <class name="jalview.commands.EditCommandTest"/>
+      <class name="jalview.ext.rbvi.chimera.JalviewChimeraView"/>
+      <class name="jalview.ws.jabaws.JpredJabaStructExportImport"/>
+      <class name="jalview.gui.HelpTest"/>
+      <class name="jalview.datamodel.AlignedCodonIteratorTest"/>
+      <class name="jalview.datamodel.xdb.embl.EmblFileTest"/>
+      <class name="jalview.util.ComparisonTest"/>
+      <class name="jalview.util.QuickSortTest"/>
+      <class name="jalview.ws.PDBSequenceFetcherTest"/>
+      <class name="jalview.analysis.scoremodels.FeatureScoreModelTest"/>
+      <class name="jalview.io.Jalview2xmlTests"/>
+      <class name="jalview.ws.rest.RestClientTest"/>
+      <class name="jalview.datamodel.AlignedCodonFrameTest"/>
+      <class name="jalview.datamodel.MappingTest"/>
+      <class name="jalview.datamodel.AlignmentTest"/>
+      <class name="jalview.ws.dbsources.UniprotTest"/>
+      <class name="jalview.gui.AnnotationChooserTest"/>
+      <class name="jalview.structure.Mapping"/>
+      <class name="jalview.datamodel.SequenceTest"/>
+      <class name="jalview.datamodel.PDBEntryTest"/>
+      <class name="jalview.gui.StructureChooserTest"/>
+      <class name="jalview.schemes.DnaCodonTests"/>
+      <class name="com.stevesoft.pat.RegexWriterTest"/>
+      <class name="jalview.datamodel.DBRefEntryTest"/>
+      <class name="jalview.gui.FontChooserTest"/>
+      <class name="jalview.analysis.TestAlignSeq"/>
+      <class name="jalview.datamodel.SeqCigarTest"/>
+      <class name="jalview.gui.JAL1353bugdemo"/>
+    </classes>
+  </test> <!-- Test -->
+</suite> <!-- Suite --> 
diff --git a/utils/junit-4.12.jar b/utils/junit-4.12.jar
new file mode 100644 (file)
index 0000000..3a7fc26
Binary files /dev/null and b/utils/junit-4.12.jar differ
diff --git a/utils/testnglibs/bsh-2.0b4.jar b/utils/testnglibs/bsh-2.0b4.jar
new file mode 100644 (file)
index 0000000..36fe03d
Binary files /dev/null and b/utils/testnglibs/bsh-2.0b4.jar differ
diff --git a/utils/testnglibs/guava-base-r03.jar b/utils/testnglibs/guava-base-r03.jar
new file mode 100644 (file)
index 0000000..2323db9
Binary files /dev/null and b/utils/testnglibs/guava-base-r03.jar differ
diff --git a/utils/testnglibs/guava-collections-r03.jar b/utils/testnglibs/guava-collections-r03.jar
new file mode 100644 (file)
index 0000000..e8f908d
Binary files /dev/null and b/utils/testnglibs/guava-collections-r03.jar differ
diff --git a/utils/testnglibs/jcommander.jar b/utils/testnglibs/jcommander.jar
new file mode 100644 (file)
index 0000000..ad0a12c
Binary files /dev/null and b/utils/testnglibs/jcommander.jar differ
diff --git a/utils/testnglibs/junit-4.12.jar b/utils/testnglibs/junit-4.12.jar
new file mode 100644 (file)
index 0000000..3a7fc26
Binary files /dev/null and b/utils/testnglibs/junit-4.12.jar differ
diff --git a/utils/testnglibs/snakeyaml.jar b/utils/testnglibs/snakeyaml.jar
new file mode 100644 (file)
index 0000000..fd314d3
Binary files /dev/null and b/utils/testnglibs/snakeyaml.jar differ
diff --git a/utils/testnglibs/testng-sources.jar b/utils/testnglibs/testng-sources.jar
new file mode 100644 (file)
index 0000000..7a80303
Binary files /dev/null and b/utils/testnglibs/testng-sources.jar differ
diff --git a/utils/testnglibs/testng.jar b/utils/testnglibs/testng.jar
new file mode 100644 (file)
index 0000000..e1f127e
Binary files /dev/null and b/utils/testnglibs/testng.jar differ