diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-05 09:54:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-05 11:31:50 +0200 |
commit | 0c5f51ebbcb7e22baa913e2012e3dcfcc6cf7897 (patch) | |
tree | 3d441110176e37c1a6ba2d15a3653d5023863075 /framework | |
parent | d26540bb05b0443e7988da34372c86f88cbf1f6c (diff) |
java: remove commented out code
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
Diffstat (limited to 'framework')
15 files changed, 0 insertions, 571 deletions
diff --git a/framework/qa/complex/ModuleManager/CheckXModuleManager.java b/framework/qa/complex/ModuleManager/CheckXModuleManager.java index ef43d156ee73..f4e1a6d81c8d 100644 --- a/framework/qa/complex/ModuleManager/CheckXModuleManager.java +++ b/framework/qa/complex/ModuleManager/CheckXModuleManager.java @@ -62,24 +62,6 @@ public class CheckXModuleManager // test environment - /** @short A function to tell the framework, - which test functions are available. - - @return All test methods. - @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkModuleIdentification" , -// "checkModuleConfigurationReadable" , -// "checkModuleConfigurationWriteable", -// "checkModuleConfigurationQueries" -// }; -// } - - /** @short Create the environment for following tests. @descr Use either a component loader from desktop or diff --git a/framework/qa/complex/XUserInputInterception/EventTest.java b/framework/qa/complex/XUserInputInterception/EventTest.java index 1ce381454d58..aef6fca6b4df 100644 --- a/framework/qa/complex/XUserInputInterception/EventTest.java +++ b/framework/qa/complex/XUserInputInterception/EventTest.java @@ -92,33 +92,6 @@ public class EventTest { /** - * The test methods are: - * <ul> - * <li><CODE>checkTextDocument</CODE></LI> - * <li><CODE>checkCalcDocument</CODE></LI> - * <li><CODE>checkDrawDocument</CODE></LI> - * <li><CODE>checkImpressDocument</CODE></LI> - * <li><CODE>checkChartDocument</CODE></LI> - * <li><CODE>checkMathDocument</CODE></li> - * </ul> - * @short A function to tell the framework, - * which test functions are available. - * @return All test methods. - * @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() { -// return new String[] -// { "checkTextDocument", -// "checkCalcDocument", -// "checkDrawDocument", -// "checkImpressDocument", -// "checkChartDocument", -// "checkMathDocument", -// }; -// } - - - /** * creates the mebmer <CODE>m_xMSF</CODE> and <CODE>m_SOF</CODE> * @short Create the environment for following tests. * @descr create an empty test frame, where we can load diff --git a/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java b/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java index 9d2a55a59add..95314dbf3b17 100644 --- a/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java +++ b/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java @@ -36,9 +36,6 @@ import com.sun.star.uno.AnyConverter; import com.sun.star.uno.UnoRuntime; import com.sun.star.util.XChangesBatch; -// import complex.accelerators.KeyMapping; - - // ---------- junit imports ----------------- import org.junit.After; import org.junit.AfterClass; @@ -69,18 +66,6 @@ public class AcceleratorsConfigurationTest // test environment - /** @short todo document me - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkGlobalAccelCfg", -// "checkModuleAccelCfg", -// "checkDocumentAccelCfg" -// }; -// } - /** @short Create the environment for following tests. */ @Before @@ -355,10 +340,8 @@ public class AcceleratorsConfigurationTest String tempDirURL = util.utils.getOfficeTemp/*Dir*/(getMSF()); sDocCfgName = FileHelper.appendPath(tempDirURL, "test.cfg"); - // sDocCfgName = "file:///c:/test.cfg"; SaveDocumentAcceleratorConfiguration(sDocCfgName); - // sDocCfgName = "file:///c:/test.cfg"; LoadDocumentAcceleratorConfiguration(sDocCfgName); } diff --git a/framework/qa/complex/api_internal/CheckAPI.java b/framework/qa/complex/api_internal/CheckAPI.java index a57afecd015a..ce73df14cea4 100644 --- a/framework/qa/complex/api_internal/CheckAPI.java +++ b/framework/qa/complex/api_internal/CheckAPI.java @@ -15,7 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -// package name: as default, start with complex package complex.api_internal; // imports @@ -50,14 +49,6 @@ import com.sun.star.uno.UnoRuntime; public class CheckAPI { /** - * Return all test methods. - * @return The test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkAPI"}; -// } - - /** * The test parameters */ private static TestParameters param = null; diff --git a/framework/qa/complex/broken_document/LoadDocument.java b/framework/qa/complex/broken_document/LoadDocument.java index b1ef17e25008..61edec968d39 100644 --- a/framework/qa/complex/broken_document/LoadDocument.java +++ b/framework/qa/complex/broken_document/LoadDocument.java @@ -18,7 +18,6 @@ package complex.broken_document; import com.sun.star.beans.PropertyValue; -// import com.sun.star.frame.FrameSearchFlag; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XFrame; import com.sun.star.lang.XMultiServiceFactory; @@ -38,16 +37,6 @@ import static org.junit.Assert.*; */ public class LoadDocument { - /** defect file to load **/ - // private final String mFileName = "dbf.dbf.emf"; - - /** - * Get all test methods. - * @return The test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkHeadlessState"}; -// } /** * Start Office with "--headless" parameter, then @@ -70,8 +59,6 @@ public class LoadDocument { System.out.println("xDektopLoader is null: " + (xDesktopLoader == null)); PropertyValue[] val = new PropertyValue[0]; - // String workingDir = (String)param.get("WorkingDir") + System.getProperty("file.separator") + mFileName; - // System.out.println("Working dir: " + workingDir); String fileUrl = complex.broken_document.TestDocument.getUrl("dbf.dbf.emf"); System.out.println("File Url: " + fileUrl); diff --git a/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java b/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java index 586c362e4030..f621a5a5ef0b 100644 --- a/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java +++ b/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java @@ -109,21 +109,8 @@ public class CheckContextMenuInterceptor xFrame = null; -// xClose = UnoRuntime.queryInterface(XCloseable.class, xDrawDoc); -// try -// { -// xClose.close(true); -// } -// catch (com.sun.star.util.CloseVetoException exVeto) -// { -// fail("Test DrawDoc couldn't be closed successfully."); -// } - } -// public String[] getTestMethodNames() { -// return new String[]{"checkContextMenuInterceptor"}; -// } @Test public void checkContextMenuInterceptor() { @@ -156,7 +143,6 @@ public class CheckContextMenuInterceptor try { String sFile = OfficeFileUrl.getAbsolute(new File("space-metal.jpg")); - // String sFile = util.utils.getFullTestURL("space-metal.jpg"); oShapeProps.setPropertyValue("GraphicURL", sFile); Object oProp = oShapeProps.getPropertyValue("GraphicObjectFillBitmap"); xBitmap = (XBitmap) AnyConverter.toObject(new Type(XBitmap.class), oProp); diff --git a/framework/qa/complex/desktop/DesktopTerminate.java b/framework/qa/complex/desktop/DesktopTerminate.java index f716e40bc6fb..468dcc59f478 100644 --- a/framework/qa/complex/desktop/DesktopTerminate.java +++ b/framework/qa/complex/desktop/DesktopTerminate.java @@ -41,19 +41,6 @@ public class DesktopTerminate private int iOfficeCloseTime = 1000; /** - * A frunction to tell the framework, which test functions are available. - * Right now, it's only 'checkPersistentWindowState'. - * @return All test methods. - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkPersistentWindowState" -// }; -// } - - /** * Test if all available document types change the * persistent Window Attributes * @@ -80,14 +67,6 @@ public class DesktopTerminate { System.out.println("Connect the first time."); -// System.out.println("AppExecCommand: " + (String) param.get("AppExecutionCommand")); -// System.out.println("ConnString: " + (String) param.get("ConnectionString")); -// oProvider = new OfficeProvider(); -// iOfficeCloseTime = param.getInt("OfficeCloseTime"); -// if (iOfficeCloseTime == 0) -// { -// iOfficeCloseTime = 1000; -// } if (!connect()) { diff --git a/framework/qa/complex/dispatches/checkdispatchapi.java b/framework/qa/complex/dispatches/checkdispatchapi.java index 451b4e600870..32f91388ceec 100644 --- a/framework/qa/complex/dispatches/checkdispatchapi.java +++ b/framework/qa/complex/dispatches/checkdispatchapi.java @@ -69,36 +69,6 @@ public class checkdispatchapi // test environment - /** @short A function to tell the framework, - which test functions are available. - - @return All test methods. - @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkDispatchInfoOfWriter", -// "checkDispatchInfoOfCalc", -// "checkDispatchInfoOfDraw", -// "checkDispatchInfoOfImpress", -// "checkDispatchInfoOfMath", -// "checkDispatchInfoOfChart", -// "checkDispatchInfoOfBibliography", -// "checkDispatchInfoOfQueryDesign", -// "checkDispatchInfoOfTableDesign", -// "checkDispatchInfoOfFormGridView", -// "checkDispatchInfoOfDataSourceBrowser", -// "checkDispatchInfoOfRelationDesign", -// "checkDispatchInfoOfBasic", -// "checkDispatchInfoOfStartModule", -// "checkInterceptorLifeTime", -// "checkInterception" -// }; -// } - - /** @short Create the environment for following tests. @descr create an empty test frame, where we can load diff --git a/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java b/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java index 31e6262291a4..6d042dd8ac18 100644 --- a/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java +++ b/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java @@ -36,14 +36,6 @@ import static org.junit.Assert.*; public class GetServiceWhileDisposingOffice { -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkServiceWhileDisposing" -// }; -// } - @Test public void checkServiceWhileDisposing() { XMultiServiceFactory xMSF = getMSF(); diff --git a/framework/qa/complex/framework/autosave/AutoSave.java b/framework/qa/complex/framework/autosave/AutoSave.java index 6cb9e7ace213..1125755ec45b 100644 --- a/framework/qa/complex/framework/autosave/AutoSave.java +++ b/framework/qa/complex/framework/autosave/AutoSave.java @@ -172,21 +172,6 @@ public class AutoSave // test environment - /** @short A function to tell the framework, - which test functions are available. - - @return All test methods. - @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkConcurrentAutoSaveToNormalUISave", -// }; -// } - - /** @short Create the environment for following tests. @descr create an empty test frame, where we can load diff --git a/framework/qa/complex/imageManager/CheckImageManager.java b/framework/qa/complex/imageManager/CheckImageManager.java index e91d9eef49f1..02111c0d89f4 100644 --- a/framework/qa/complex/imageManager/CheckImageManager.java +++ b/framework/qa/complex/imageManager/CheckImageManager.java @@ -127,7 +127,6 @@ public class CheckImageManager { _XUIConfigurationPersistence _xUIConfigPersistence = new _XUIConfigurationPersistence(param, xUIConfigPersistence); _xUIConfigPersistence.before(); assertTrue(testObjectName + "::XUIConfigPersistence.isModified", _xUIConfigPersistence._isModified()); - // System.out.println(testObjectName + "::XUIConfigPersistence.isReadOnly "+ _xUIConfigPersistence._isReadOnly()); assertTrue(testObjectName + "::XUIConfigPersistence.isReadOnly", _xUIConfigPersistence._isReadOnly()); assertTrue(testObjectName + "::XUIConfigPersistence.reload", _xUIConfigPersistence._reload()); assertTrue(testObjectName + "::XUIConfigPersistence.store", _xUIConfigPersistence._store()); diff --git a/framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java b/framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java index 40c5548f04e0..3e2b37bda924 100644 --- a/framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java +++ b/framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java @@ -115,26 +115,6 @@ public class CheckXComponentLoader // test environment - /** @short A function to tell the framework, - which test functions are available. - - @return All test methods. - @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() -// { -// // TODO think about trigger of sub-tests from outside -// return new String[] -// { -// "checkURLEncoding" , -// "checkURLHandling" , -// "checkUsingOfMediaDescriptor", -// "checkStreamLoading" , -// "checkLoadingWithPassword" -// }; -// } - - /** @short Create the environment for following tests. @descr Use either a component loader from desktop or @@ -207,12 +187,6 @@ public class CheckXComponentLoader String sCompletePath = aFile.getAbsolutePath(); String sSubPath = sCompletePath.substring(nBasePathLength); - // Some test files are checked into CVS. ignore CVS helper files! -// if (sSubPath.indexOf("CVS") > -1) -// { -// continue; -// } - m_lTestFiles.add(sSubPath); } } @@ -295,10 +269,6 @@ public class CheckXComponentLoader { File aDir = new File(sTempPath); aDir.mkdirs(); -// if (!aDir.exists()) -// { -// fail("Could not access temp directory \"" + sTempPath + "\"."); -// } // TODO: create a temp file which not exist! for (int i=0; i<999999; ++i) @@ -467,112 +437,6 @@ public class CheckXComponentLoader } } - /** - * Check url handling with a load of URLs. - * 1. unsupported URLs. - * 2. "stupid" URLs - * 3. case sensitive URLs - * 4. FTP URLs - * 5. HTTP URLs - */ -// public void checkURLHandling() { -// PropertyValue[] lProps = new PropertyValue[1]; -// -// lProps[0] = new PropertyValue(); -// lProps[0].Name = "Hidden"; -// lProps[0].Value = Boolean.TRUE; -// -// System.out.println("check possible but unsupported URLs"); -// -// String[] sIllegalArgs = new String[] { -// "slot:5000", "slot:10909", ".uno:SaveAs", ".uno:Open", -// }; -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sIllegalArgs, -// "_blank", 0, lProps); -// -// System.out.println("check stupid URLs"); -// -// sIllegalArgs = new String[] { -// "slot:xxx", "slot:111111111", ".uno:save_as", ".uno:open_this", -// ".UnO:*", -// }; -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sIllegalArgs, -// "_blank", 0, lProps); -// -// String[] sEmptyDocs = new String[] { -// "mailo:hansi.meier@germany.sun.com", "file:/c:\\test/file.cxx", -// "file:///c|:\\test/file.cxx", "http_server://staroffice-doc\\", -// "c:\\\\test///\\test.sxw", "news_:staroffice-doc", -// "newsletter@blubber", "private_factory/swriter", -// "private:factory//swriter", "private:factory/swriter/___", -// "c:\\test\\test.sxw", "macro:///ImportWizard.Main.Main", -// "macro:///Euro.AutoPilotRun.StartAutoPilot", -// "service:com.sun.star.frame.Frame", -// "mailto:steffen.grund@germany.sun.com", "news:staroffice-doc", -// "macro:/ExportWizard", "macro://Euro.AutoPilotRun.StartAutoPilot", -// "service:com.sun.star.frame." -// }; -// -// //with cws_loadenv01 changed to IllegalArgumentException -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sEmptyDocs, "_blank", 0, -// lProps); -// -// System.out.println("check case sensitive URLs"); -// -// sIllegalArgs = new String[] { -// "sLot:5000", "sloT:10909", ".unO:SaveAs", ".uno:OPEN", -// }; -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sIllegalArgs, -// "_blank", 0, lProps); -// -// sEmptyDocs = new String[] { -// "private:factory/SWRITER", "private:factory/SWRITER/WEB", -// "macro:///importwizard.main.main", -// "Macro:///euro.autopilotrun.startautopilot", -// "Service:Com.Sun.Star.Frame.Frame", -// "Mailto:andreas.schluens@germany.sun.com", "neWs:staroffice-doc", -// "News:Staroffice-doc" -// }; -// -// //with cws_loadenv01 changed to IllegalArgumentException -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sEmptyDocs, "_blank", 0, -// lProps); -// -// System.out.println("check FTP URLs"); -// -// String sFTPURL = (String) param.get("FtpAccess"); -// Enumeration aSnapshot = m_lTestFiles.elements(); -// -// while (aSnapshot.hasMoreElements()) { -// String doc = (String) aSnapshot.nextElement(); -// -// -// // if os is windows -// doc = doc.replace('\\', '/'); -// if (doc.indexOf("CVS")<0) { -// loadURL(m_xLoader, RESULT_VALID_DOC, sFTPURL + "/" + doc, -// "_blank", 0, lProps); -// } -// } -// -// System.out.println("check HTTP URLs"); -// -// String sHTTPURL = (String) param.get("HttpAccess"); -// aSnapshot = m_lTestFiles.elements(); -// -// while (aSnapshot.hasMoreElements()) { -// String doc = (String) aSnapshot.nextElement(); -// -// -// // if os is windows -// doc = doc.replace('\\', '/'); -// if (doc.indexOf("CVS")<0) { -// loadURL(m_xLoader, RESULT_VALID_DOC, sHTTPURL + "/" + doc, -// "_blank", 0, lProps); -// } -// } -// } - /** TODo document me */ @Test public void checkStreamLoading() @@ -592,11 +456,6 @@ public class CheckXComponentLoader File aFile = new File(m_sTestDocPath, aSnapshot.next()); String sURL = URLHelper.getFileURLFromSystemPath(aFile); -// if (sURL.indexOf("CVS") > -1) -// { -// continue; -// } - try { XInputStream xStream = m_xStreamProvider.openFileRead(sURL); @@ -609,8 +468,6 @@ public class CheckXComponentLoader // check different version of "private:stream" URL! loadURL(m_xLoader, RESULT_VALID_DOC, "private:stream" , "_blank", 0, lProps); - // loadURL(m_xLoader, RESULT_VALID_DOC, "private:stream" , "_blank", 0, lProps); - // loadURL(m_xLoader, RESULT_VALID_DOC, "private:stream/", "_blank", 0, lProps); } } diff --git a/framework/qa/complex/loadAllDocuments/StatusIndicator.java b/framework/qa/complex/loadAllDocuments/StatusIndicator.java index ad1a63c6cba7..eb96e2d428a1 100644 --- a/framework/qa/complex/loadAllDocuments/StatusIndicator.java +++ b/framework/qa/complex/loadAllDocuments/StatusIndicator.java @@ -158,17 +158,6 @@ public class StatusIndicator implements com.sun.star.task.XStatusIndicator */ private void impl_show() { -/* synchronized(this) - { - if ((m_nOut & SHOWSTATUS_LOG) == SHOWSTATUS_LOG) - //m_aProtocol.log("\t["+m_nValue+"/"+m_nRange+"] "+m_sText+"\n"); - - //if ((m_nOut & SHOWSTATUS_DIALOG) == SHOWSTATUS_DIALOG) - // not supported yet! - - //if ((m_nOut & SHOWSTATUS_LINK) == SHOWSTATUS_LINK) - // not supported yet! - } */ } public boolean wasUsed() { diff --git a/framework/qa/complex/path_settings/PathSettingsTest.java b/framework/qa/complex/path_settings/PathSettingsTest.java index c05becb0705c..f23cf0e9ffa4 100644 --- a/framework/qa/complex/path_settings/PathSettingsTest.java +++ b/framework/qa/complex/path_settings/PathSettingsTest.java @@ -91,17 +91,6 @@ public class PathSettingsTest ArrayList<Property> aListOfWorkingProperty; /** - * A function to tell the framework, which test functions are available. - * Right now, it's only 'checkComplexTemplateState'. - * @return All test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkXFastPropertySet", -// "checkXMultiPropertySet", -// "checkXPropertySet" -// }; -// } - /** * Initialize before the tests start: this has to be done only once. * This methods sets the 'aPathSettings' and 'xPropertyInfoOfPathSettings' variables. */ @@ -112,8 +101,6 @@ public class PathSettingsTest { aPathSettings = thePathSettings.get(connection.getComponentContext()); assertNotNull("Can't instantiate com.sun.star.util.thePathSettings.", aPathSettings); -// System.out.println("Implementation: " + util.utils.getImplName(aPathSettings)); -// System.out.println("Service: "); util.dbg.getSuppServices(aPathSettings); final XPropertySet xPropSet_of_PathSettings = UnoRuntime.queryInterface(XPropertySet.class, aPathSettings); @@ -127,7 +114,6 @@ public class PathSettingsTest for (int i = 0; i < xPropertyInfoOfPathSettings.length; i++) { final String sName = xPropertyInfoOfPathSettings[i].Name; - // System.out.println(sName); aPathSettingNames[i] = sName; Object o = xPropSet_of_PathSettings.getPropertyValue(sName); @@ -251,29 +237,18 @@ public class PathSettingsTest System.out.println("\n---- All properties ----"); final XPropertySet xPropSet_of_PathSettings = UnoRuntime.queryInterface(XPropertySet.class, aPathSettings); -// for (int i = 0; i < xPropertyInfoOfPathSettings.length; i++) for (int i = 0; i < aListOfWorkingProperty.size(); i++) { final String sName = aListOfWorkingProperty.get(i).Name; - // aPathSettingWorkingNames[i] = sName; -// System.out.print("PathSettings: Name:="); System.out.print(sName); Object o = xPropSet_of_PathSettings.getPropertyValue(sName); - // System.out.println("#### Object: '" + o.getClass().getName() + "' - '" + o.toString() + "'"); try { final String sValue = AnyConverter.toString(o); - // aPathSettingValues[i] = sValue; - // System.out.println("#### String " + sValue); - // System.out.println("Property Name: " + sName); - // System.out.println("Property Value: " + sValue); -// System.out.print(" ==> "); -// System.out.print(sValue); } catch (com.sun.star.lang.IllegalArgumentException e) { -// System.out.print(" FAILED "); } System.out.println(); } @@ -653,222 +628,11 @@ public class PathSettingsTest } - /** - * This tests the XMultiPropertySet interface implementation. - */ - - // The test checkXMultiPropertySet() has been marked as outdated! - -// @Test -// public void checkXMultiPropertySet() -// { -// System.out.println("---- Testing the XMultiPropertySet interface ----"); -// XMultiPropertySet xMPS = UnoRuntime.queryInterface(XMultiPropertySet.class, aPathSettings); -// -// // xPropertyInfoOfPathSettings.length -// String[] propertiesToTest = new String[1]; -// propertiesToTest[0] = availablePropNames[0]; -// -// String[] correctVals = new String[propertiesToTest.length]; -// String[] incorrectVals = new String[propertiesToTest.length]; -// -// String[] aPathSettingWorkingNames = null; -// aPathSettingWorkingNames = new String[propertiesToTest.length]; -// -// // get intitial values and create new ones -// for (int i = 0; i < propertiesToTest.length; i++) -// { -// // Property aProp = aListOfWorkingProperty.get(i); -// final String sName = propertiesToTest[i]; -// final String sValue = getPropertyValueAsString(sName); -// aPathSettingWorkingNames[i] = sName; -// correctVals[i] = changeToCorrectValue(sValue); -// incorrectVals[i] = changeToIncorrectValue(sValue); -// } -// -// try -// { -// // add a change listener -// MyChangeListener mListener = new MyChangeListener(); -// xMPS.addPropertiesChangeListener(aPathSettingWorkingNames, mListener); -// -// // first change xPropertyInfoOfPathSettings to correct values -// System.out.println("Change to correct values."); -// xMPS.setPropertyValues(aPathSettingWorkingNames, correctVals); -// assertTrue("Could not change to correct values with XMultiPropertySet.", -// verifyPropertySet(xMPS, aPathSettingWorkingNames, correctVals) > 0); -// -// // second, change to incorrect values: expect an exception -// System.out.println("Try to change to incorrect values."); -// try -// { -// xMPS.setPropertyValues(aPathSettingWorkingNames, incorrectVals); -// } -// catch (com.sun.star.lang.IllegalArgumentException r) -// { -// System.out.println("Correctly thrown Exception caught."); -// } -// assertTrue("Did change to incorrect values with XMultiPropertySet," -// + " but should not have.", -// verifyPropertySet(xMPS, aPathSettingWorkingNames, correctVals) > 0); -// -// // third, change back to initial values -// System.out.println("Change back to initial values."); -// xMPS.setPropertyValues(aPathSettingWorkingNames, aPathSettingValues); -// assertTrue("Could not change back to initial values with" -// + " XMultiPropertySet.", -// verifyPropertySet(xMPS, aPathSettingWorkingNames, aPathSettingValues) > 0); -// -// // fire the event for the listener -// System.out.println("Fire event."); -// xMPS.firePropertiesChangeEvent(aPathSettingWorkingNames, mListener); -// assertTrue("Event was not fired on XMultiPropertySet.", -// mListener.changePropertiesEventFired()); -// } -// catch (com.sun.star.uno.Exception e) -// { -//// e.printStackTrace(); -// System.out.println(e.getClass().getName()); -// System.out.println("Message: " + e.getMessage()); -// fail("Unexpected exception on XMultiPropertySet."); -// } -// -// // test finished -// System.out.println("---- Test of XMultiPropertySet finished ----\n"); -// } - - /** - * Verify if the values of xPropSet_of_PathSettings are the same as vals. - * @param xPropSet_of_PathSettings A XMultiPropertySet. - * @param aPathSettingWorkingNames An array with property names. - * @param vals An array with values of the properties - * @return -1 if none are equal, 1 if all are equal, 0 if some were equal - * and some not. - * @throws com.sun.star.lang.IllegalArgumentException - */ -// private int verifyPropertySet(XMultiPropertySet xProp, -// String[] propNames, String[] vals) -// { -// int ret = 0; -// if (vals.length != propNames.length) -// { -// System.out.println("Length of array parameters must be equal."); -// return ret; -// } -// for (int i = 0; i < vals.length; i++) -// { -// Object[] objs = xProp.getPropertyValues(new String[] -// { -// propNames[i] -// }); -// String retVal = (String) objs[0]; -// boolean nCheck = retVal.equals(vals[i]); -// if (!nCheck) -// { -// System.out.println("Property '" + propNames[i] -// + "' was supposed to have value:"); -// System.out.println(vals[i]); -// System.out.println("but has value:"); -// System.out.println(retVal); -// } -// // initialize -// if (i == 0) -// { -// ret = nCheck ? 1 : -1; -// continue; -// } -// // return 0 if equal state changes compared to initial value -// if ((nCheck && ret < 0) || (!nCheck && ret > 0)) -// { -// ret = 0; -// } -// } -// return ret; -// } - // ____________________ /** * This tests the XPropertySet interface implementation. */ -// The test checkXPropertySet() has been marked as outdated! - - -// @Test -// public void checkXPropertySet() -// { -// System.out.println("---- Testing the XPropertySet interface ----"); -// -// XPropertySet xPS = UnoRuntime.queryInterface(XPropertySet.class, aPathSettings); -// -// MyChangeListener mListener1 = new MyChangeListener(); -// MyChangeListener mListener2 = new MyChangeListener(); -// -// for (int i = 0; i < xPropertyInfoOfPathSettings.length; i++) -// { -// // adding listeners -// String name = aPathSettingNames[i]; -// System.out.println("Testing property '" + name + "'"); -// try -// { -// System.out.println("Add 2 Listeners."); -// xPS.addPropertyChangeListener(name, mListener1); -// xPS.addVetoableChangeListener(name, mListener1); -// xPS.addPropertyChangeListener(name, mListener2); -// xPS.addVetoableChangeListener(name, mListener2); -// -// // change the property -// System.out.println("Change value."); -// String changeVal = changeToCorrectValue(aPathSettingValues[i]); -// xPS.setPropertyValue(name, changeVal); -// String newVal = (String) xPS.getPropertyValue(name); -// -// assertTrue("Value did not change on property " + name + ".", -// newVal.equals(changeVal)); -// -// assertTrue("Listener 1 was not called.", checkListener(mListener1)); -// assertTrue("Listener 2 was not called.", checkListener(mListener2)); -// -// mListener1.resetListener(); -// mListener2.resetListener(); -// -// System.out.println("Remove Listener 1."); -// -// xPS.removePropertyChangeListener(name, mListener1); -// xPS.removeVetoableChangeListener(name, mListener1); -// -// // change the property -// System.out.println("Change value back."); -// xPS.setPropertyValue(name, aPathSettingValues[i]); -// newVal = (String) xPS.getPropertyValue(name); -// assertTrue("Value did not change on property " + name, -// newVal.equals(aPathSettingValues[i])); -// -// assertTrue("Listener was called, although it was removed on" -// + " property " + name + ".", !checkListener(mListener1)); -// assertTrue("Listener 2 was not called on property " + name + ".", -// checkListener(mListener2)); -// } -// catch (com.sun.star.uno.Exception e) -// { -// System.out.println(e.getClass().getName()); -// System.out.println("Message: " + e.getMessage()); -// fail("Unexpcted exception on property " + name); -// } -// System.out.println("Finish testing property '" + aPathSettingNames[i] + "'\n"); -// } -// System.out.println("---- Test of XPropertySet finished ----\n"); -// -// } - -// private boolean checkListener(MyChangeListener ml) -// { -// return ml.changePropertyEventFired() -// || ml.changePropertiesEventFired() -// || ml.vetoableChangeEventFired(); -// } - - /** * Change the given String to a correct path URL. * @return The changed path URL. diff --git a/framework/qa/complex/path_substitution/PathSubstitutionTest.java b/framework/qa/complex/path_substitution/PathSubstitutionTest.java index b2d7c86410fc..2c55aeae2cd4 100644 --- a/framework/qa/complex/path_substitution/PathSubstitutionTest.java +++ b/framework/qa/complex/path_substitution/PathSubstitutionTest.java @@ -43,14 +43,6 @@ public class PathSubstitutionTest private VariableContainer substVars = null; /** - * A function to tell the framework, which test functions are available. - * Right now, it's only 'checkXStringSubstitution'. - * @return All test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkXStringSubstitution"}; -// } - /** * Create an array with all substitution variables */ @Before public void initialize() |