JAL-1328 System.exit() removed as it aborts an entire JUnit suite
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 16 Dec 2014 11:21:54 +0000 (11:21 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 16 Dec 2014 11:21:54 +0000 (11:21 +0000)
test/jalview/ws/jabaws/JpredJabaStructExportImport.java
test/jalview/ws/jabaws/RNAStructExportImport.java

index f0b8f99..30317f7 100644 (file)
@@ -33,7 +33,6 @@ import jalview.ws.jws2.JabaParamStore;
 import jalview.ws.jws2.Jws2Discoverer;
 import jalview.ws.jws2.SequenceAnnotationWSClient;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
-import jalview.ws.params.ArgumentI;
 import jalview.ws.params.AutoCalcSetting;
 
 import java.awt.Component;
@@ -78,11 +77,6 @@ public class JpredJabaStructExportImport
       }
     }
 
-    System.out.println("State of jpredws: " + jpredws);
-
-    if (jpredws == null)
-      System.exit(0);
-
     jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
 
     af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.FormatAdapter.FILE);
@@ -111,6 +105,8 @@ public class JpredJabaStructExportImport
                     af.getViewport().getSelectionGroup().getSequenceAt(0),
                     false);
     af.hideSelSequences_actionPerformed(null);
+
+    assertNotNull(jpredws);
     jpredClient = new JPred301Client(jpredws, af, null, null);
 
     assertTrue(
@@ -156,7 +152,7 @@ public class JpredJabaStructExportImport
   @Test
   public void testJPredStructExport()
   {
-
+    assertNotNull(jpredws);
     jpredClient = new JPred301Client(jpredws, af, null, null);
 
     af.getViewport().getCalcManager().startWorker(jpredClient);
@@ -250,6 +246,8 @@ public class JpredJabaStructExportImport
         opts.add(rg);
       }
     }
+
+    assertNotNull(jpredws);
     jpredClient = new JPred301Client(jpredws, af, null, opts);
 
     af.getViewport().getCalcManager().startWorker(jpredClient);
index 9a723ca..2c6fd0c 100644 (file)
  */
 package jalview.ws.jabaws;
 
-import static org.junit.Assert.*;
-
-import java.awt.Component;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Vector;
-
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-
-import jalview.api.AlignCalcManagerI;
-import jalview.datamodel.AlignmentAnnotation;
+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.Annotation;
 import jalview.gui.Jalview2XML;
 import jalview.io.AnnotationFile;
 import jalview.io.FormatAdapter;
 import jalview.io.StockholmFileTest;
-import jalview.ws.jws2.AADisorderClient;
 import jalview.ws.jws2.Jws2Discoverer;
 import jalview.ws.jws2.RNAalifoldClient;
 import jalview.ws.jws2.SequenceAnnotationWSClient;
-import jalview.ws.jws2.dm.JabaOption;
 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.BeforeClass;
 import org.junit.Test;
@@ -83,9 +77,6 @@ public class RNAStructExportImport
 
     System.out.println("State of rnaalifoldws: " + rnaalifoldws);
 
-    if (rnaalifoldws == null)
-      System.exit(0);
-
     jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
 
     af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.FormatAdapter.FILE);
@@ -200,6 +191,8 @@ public class RNAStructExportImport
         opts.add(rg);
       }
     }
+
+    assertNotNull(rnaalifoldws);
     alifoldClient = new RNAalifoldClient(rnaalifoldws, af, null, opts);
 
     af.getViewport().getCalcManager().startWorker(alifoldClient);