You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by cm...@apache.org on 2012/08/18 03:46:01 UTC

svn commit: r1374500 - /incubator/ooo/devtools/netbeansintegration/trunk/test/qa-functional/src/org/openoffice/extensions/test/TestAllResourcesTest.java

Author: cmarcum
Date: Sat Aug 18 01:46:00 2012
New Revision: 1374500

URL: http://svn.apache.org/viewvc?rev=1374500&view=rev
Log:
update to replace XTest with Simpletests

Modified:
    incubator/ooo/devtools/netbeansintegration/trunk/test/qa-functional/src/org/openoffice/extensions/test/TestAllResourcesTest.java

Modified: incubator/ooo/devtools/netbeansintegration/trunk/test/qa-functional/src/org/openoffice/extensions/test/TestAllResourcesTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/trunk/test/qa-functional/src/org/openoffice/extensions/test/TestAllResourcesTest.java?rev=1374500&r1=1374499&r2=1374500&view=diff
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/trunk/test/qa-functional/src/org/openoffice/extensions/test/TestAllResourcesTest.java (original)
+++ incubator/ooo/devtools/netbeansintegration/trunk/test/qa-functional/src/org/openoffice/extensions/test/TestAllResourcesTest.java Sat Aug 18 01:46:00 2012
@@ -52,8 +52,12 @@ import org.netbeans.jemmy.operators.JChe
 import org.netbeans.jemmy.operators.JTabbedPaneOperator;
 import org.netbeans.jemmy.operators.JTableOperator;
 import org.netbeans.jemmy.operators.JTreeOperator;
-import org.netbeans.junit.NbTestSuite;
-//import org.netbeans.junit.ide.ProjectSupport;
+// import org.netbeans.junit.NbTestSuite;
+// import org.netbeans.junit.ide.ProjectSupport;
+import org.netbeans.junit.NbModuleSuite;
+import junit.framework.Test;
+import org.netbeans.api.java.source.SourceUtils;
+import org.openide.ErrorManager;
 
 /**
  * A Test based on JellyTestCase. JellyTestCase redirects Jemmy output
@@ -83,17 +87,16 @@ public class TestAllResourcesTest extend
         super(name);
     }
     
-    /** Creates suite from particular test cases. You can define order of testcases here.
+   /** Creates suite from particular test cases. You can define order of testcases here.
      * @return
      */
-    public static NbTestSuite suite() {
-        NbTestSuite suite = new NbTestSuite();
-        suite.addTest(new TestAllResourcesTest("testInstallation"));
-        suite.addTest(new TestAllResourcesTest("testOptions"));
-        suite.addTest(new TestAllResourcesTest("testComponent"));
-        suite.addTest(new TestAllResourcesTest("testCalcAddIn"));
-        suite.addTest(new TestAllResourcesTest("testAddOn"));
-
+    public static Test suite() {
+        Test nbsuite = NbModuleSuite.create(
+                NbModuleSuite.createConfiguration(TestAllResourcesTest.class).addTest(
+                "testInstallation", "testOptions", "testComponent", 
+                "testCalcAddIn", "testAddOn")
+                );
+        
         // missing tests for filetypes
         // missing test for debugging feature
         // Make directory for backup of extensions
@@ -103,7 +106,7 @@ public class TestAllResourcesTest extend
         } else {
             System.out.println("ERROR: Couldn't created directory: " + fUserFolder.toString());
         }
-        return suite;
+        return nbsuite;
     }
     
     /** Method allowing test execution directly from the IDE.
@@ -337,7 +340,8 @@ public class TestAllResourcesTest extend
         } catch (TimeoutExpiredException e)  {
             // ignore when progress dialog was closed before we started to wait for it
         }
-        ProjectSupport.waitScanFinished();
+        // ProjectSupport.waitScanFinished();
+       waitScanFinished();
 
         // Compile
         build(sProjectName);
@@ -423,8 +427,8 @@ public class TestAllResourcesTest extend
         System.out.println(getWorkDirPath() );
         OptionsOperator op = OptionsOperator.invoke();
         System.out.println("Options opened");
-        op.switchToModernView();
-        System.out.println("switched to modern view");
+        // op.switchToModernView(); // method removed
+        // System.out.println("switched to modern view");
         op.selectMiscellaneous();
         System.out.println("selected Miscellaneous");
         String category = org.netbeans.jellytools.Bundle.getStringTrimmed("org.openoffice.extensions.config.Bundle", "AdvancedOption_DisplayName");
@@ -529,7 +533,8 @@ public class TestAllResourcesTest extend
         } catch (TimeoutExpiredException e)  {
             // ignore when progress dialog was closed before we started to wait for it
         }
-        ProjectSupport.waitScanFinished();
+        // ProjectSupport.waitScanFinished();
+        waitScanFinished();
         
         // Compile
         build(sProjectName);
@@ -741,7 +746,8 @@ public class TestAllResourcesTest extend
         } catch (TimeoutExpiredException e)  {
             // ignore when progress dialog was closed before we started to wait for it
         }
-        ProjectSupport.waitScanFinished();
+        // ProjectSupport.waitScanFinished();
+        waitScanFinished();
         
         // Compile
         build(sProjectName);
@@ -847,7 +853,8 @@ public class TestAllResourcesTest extend
         nbdo.yes();
         nbdo.waitClosed();
         
-        ProjectSupport.waitScanFinished();
+        // ProjectSupport.waitScanFinished();
+        waitScanFinished();
     }
     
 }