Revision: 19621
          http://sourceforge.net/p/gate/code/19621
Author:   markagreenwood
Date:     2016-10-04 05:35:22 +0000 (Tue, 04 Oct 2016)
Log Message:
-----------
made sure GATE.init() is called in each setup method so test order is 
immaterial to success

Modified Paths:
--------------
    
gate/branches/sawdust2/gate-core/src/test/java/gate/corpora/TestDocument.java
    gate/branches/sawdust2/gate-core/src/test/java/gate/email/TestEmail.java
    gate/branches/sawdust2/gate-core/src/test/java/gate/html/TestHtml.java
    gate/branches/sawdust2/gate-core/src/test/java/gate/persist/TestPersist.java

Modified: 
gate/branches/sawdust2/gate-core/src/test/java/gate/corpora/TestDocument.java
===================================================================
--- 
gate/branches/sawdust2/gate-core/src/test/java/gate/corpora/TestDocument.java   
    2016-10-04 01:22:48 UTC (rev 19620)
+++ 
gate/branches/sawdust2/gate-core/src/test/java/gate/corpora/TestDocument.java   
    2016-10-04 05:35:22 UTC (rev 19621)
@@ -32,9 +32,7 @@
   */
 public class TestDocument extends TestCase
 {
-  /** Construction */
-  public TestDocument(String name) { super(name); setUp();}
-
+  
   /** Base of the test server URL */
   protected static String testServer = null;
 
@@ -43,8 +41,15 @@
 
   /** Fixture set up */
   @Override
-  public void setUp() {
+  public void setUp() throws Exception {
 
+    
+      if (!Gate.isInitialised()) {
+        Gate.runInSandbox(true);
+        Gate.init();
+      }
+    
+    
     //try{
 //      Gate.init();
       //testServer = Gate.getUrl().toExternalForm();

Modified: 
gate/branches/sawdust2/gate-core/src/test/java/gate/email/TestEmail.java
===================================================================
--- gate/branches/sawdust2/gate-core/src/test/java/gate/email/TestEmail.java    
2016-10-04 01:22:48 UTC (rev 19620)
+++ gate/branches/sawdust2/gate-core/src/test/java/gate/email/TestEmail.java    
2016-10-04 05:35:22 UTC (rev 19621)
@@ -42,7 +42,11 @@
 
   /** Fixture set up */
   @Override
-  public void setUp() {
+  public void setUp() throws Exception {
+    if (!Gate.isInitialised()) {
+      Gate.runInSandbox(true);
+      Gate.init();
+    }
   } // setUp
 
   /** A test */

Modified: gate/branches/sawdust2/gate-core/src/test/java/gate/html/TestHtml.java
===================================================================
--- gate/branches/sawdust2/gate-core/src/test/java/gate/html/TestHtml.java      
2016-10-04 01:22:48 UTC (rev 19620)
+++ gate/branches/sawdust2/gate-core/src/test/java/gate/html/TestHtml.java      
2016-10-04 05:35:22 UTC (rev 19621)
@@ -36,7 +36,11 @@
 
   /** Fixture set up */
   @Override
-  public void setUp() {
+  public void setUp() throws Exception {
+    if (!Gate.isInitialised()) {
+      Gate.runInSandbox(true);
+      Gate.init();
+    }
   } // setUp
 
   /** A test */

Modified: 
gate/branches/sawdust2/gate-core/src/test/java/gate/persist/TestPersist.java
===================================================================
--- 
gate/branches/sawdust2/gate-core/src/test/java/gate/persist/TestPersist.java    
    2016-10-04 01:22:48 UTC (rev 19620)
+++ 
gate/branches/sawdust2/gate-core/src/test/java/gate/persist/TestPersist.java    
    2016-10-04 05:35:22 UTC (rev 19621)
@@ -56,6 +56,10 @@
   /** Fixture set up */
   @Override
   public void setUp() throws Exception {
+    if (!Gate.isInitialised()) {
+      Gate.runInSandbox(true);
+      Gate.init();
+    }
   } // setUp
 
   /**

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GATE-cvs mailing list
GATE-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to