summaryrefslogtreecommitdiff
path: root/qadevOOo/tests
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2013-01-04 18:57:08 +0000
committerAriel Constenla-Haile <arielch@apache.org>2013-01-04 18:57:08 +0000
commit938c867ce8820104a116ca46ffe683a9a69c285d (patch)
tree3c47861ac00173f92971e8cb39cd5bec489161f5 /qadevOOo/tests
parent11c6e0d643b4646167aa1b30a32fc0c6881b1596 (diff)
i121579 - Clean-up system mail API
Notes
Notes: reject: half-baked clean-up of published mail API (e.g., consolidates Simple{Command,System}Mail but keeps needless queryMailClient indirection; consolidates XSimpleMailMessage{,2} but needlessly keeps it an interface instead of a struct); probably does more harm than good
Diffstat (limited to 'qadevOOo/tests')
-rw-r--r--qadevOOo/tests/basic/ifc/system/XSimpleMailClientSupplier/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/system/XSimpleMailClientSupplier/system_XSimpleMailClientSupplier.xba60
-rw-r--r--qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/cmdmail_SimpleCommandMail.xba51
-rw-r--r--qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/script.xlb5
-rw-r--r--qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/script.xlb5
-rw-r--r--qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/smplmail_SimpleSystemMail.xba57
-rw-r--r--qadevOOo/tests/java/ifc/system/_XSimpleMailClientSupplier.java73
-rw-r--r--qadevOOo/tests/java/mod/_cmdmail/SimpleCommandMail.java67
-rw-r--r--qadevOOo/tests/java/mod/_smplmail/SimpleSystemMail.java117
9 files changed, 0 insertions, 440 deletions
diff --git a/qadevOOo/tests/basic/ifc/system/XSimpleMailClientSupplier/script.xlb b/qadevOOo/tests/basic/ifc/system/XSimpleMailClientSupplier/script.xlb
deleted file mode 100644
index f8c67fe40fa3..000000000000
--- a/qadevOOo/tests/basic/ifc/system/XSimpleMailClientSupplier/script.xlb
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
-<library:library xmlns:library="http://openoffice.org/2000/library" library:name="system_XSimpleMailClientSupplier" library:readonly="false" library:passwordprotected="false">
-"<library:element library:name="system_XSimpleMailClientSupplier"/>
-"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/system/XSimpleMailClientSupplier/system_XSimpleMailClientSupplier.xba b/qadevOOo/tests/basic/ifc/system/XSimpleMailClientSupplier/system_XSimpleMailClientSupplier.xba
deleted file mode 100644
index c6ba4534a508..000000000000
--- a/qadevOOo/tests/basic/ifc/system/XSimpleMailClientSupplier/system_XSimpleMailClientSupplier.xba
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="system_XSimpleMailClientSupplier" script:language="StarBasic">
-
-
-'*************************************************************************
-'
-' Licensed to the Apache Software Foundation (ASF) under one
-' or more contributor license agreements. See the NOTICE file
-' distributed with this work for additional information
-' regarding copyright ownership. The ASF licenses this file
-' to you under the Apache License, Version 2.0 (the
-' "License"); you may not use this file except in compliance
-' with the License. You may obtain a copy of the License at
-'
-' http://www.apache.org/licenses/LICENSE-2.0
-'
-' Unless required by applicable law or agreed to in writing,
-' software distributed under the License is distributed on an
-' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-' KIND, either express or implied. See the License for the
-' specific language governing permissions and limitations
-' under the License.
-'
-'*************************************************************************
-
-
-
-
-
-
-
-Sub RunTest()
-
-'*************************************************************************
-' INTERFACE:
-' com.sun.star.system.XSimpleMailClientSupplier
-'*************************************************************************
-On Error Goto ErrHndl
- Dim bOK As Boolean
-
- Dim oClient As Object
-
- Test.StartMethod("querySimpleMailClient()")
- if (GetGuiType() = GUI_TYPE_WINDOWS) then
- Out.Log("OS is Win : trying to query mail client ...")
- bOK = isObject(oObj.querySimpleMailClient())
- else
- Out.Log("OS is not Win : service is not available.")
- bOK = true
- endif
- Test.MethodTested("querySimpleMailClient()", bOK)
-
-Exit Sub
-ErrHndl:
- Test.Exception()
- bOK = false
- resume next
-End Sub
-</script:module>
diff --git a/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/cmdmail_SimpleCommandMail.xba b/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/cmdmail_SimpleCommandMail.xba
deleted file mode 100644
index 47502f25f71a..000000000000
--- a/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/cmdmail_SimpleCommandMail.xba
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="cmdmail_SimpleCommandMail" script:language="StarBasic">
-
-
-'*************************************************************************
-'
-' Licensed to the Apache Software Foundation (ASF) under one
-' or more contributor license agreements. See the NOTICE file
-' distributed with this work for additional information
-' regarding copyright ownership. The ASF licenses this file
-' to you under the Apache License, Version 2.0 (the
-' "License"); you may not use this file except in compliance
-' with the License. You may obtain a copy of the License at
-'
-' http://www.apache.org/licenses/LICENSE-2.0
-'
-' Unless required by applicable law or agreed to in writing,
-' software distributed under the License is distributed on an
-' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-' KIND, either express or implied. See the License for the
-' specific language governing permissions and limitations
-' under the License.
-'
-'*************************************************************************
-
-
-
-
-
-' Be sure that all variables are dimensioned:
-option explicit
-
-
-
-
-Sub CreateObj()
-
-'*************************************************************************
-' COMPONENT:
-' cmdmail.SimpleCommandMail
-'*************************************************************************
-On Error Goto ErrHndl
-
- oObj = createUnoService("com.sun.star.comp.system.SimpleCommandMail")
-
-Exit Sub
-ErrHndl:
- Test.Exception()
-End Sub
-</script:module>
diff --git a/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/script.xlb b/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/script.xlb
deleted file mode 100644
index d95fbd929c1f..000000000000
--- a/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/script.xlb
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
-<library:library xmlns:library="http://openoffice.org/2000/library" library:name="cmdmail_SimpleCommandMail" library:readonly="false" library:passwordprotected="false">
-"<library:element library:name="cmdmail_SimpleCommandMail"/>
-"</library:library>
diff --git a/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/script.xlb b/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/script.xlb
deleted file mode 100644
index 4e1022aac7b8..000000000000
--- a/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/script.xlb
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
-<library:library xmlns:library="http://openoffice.org/2000/library" library:name="smplmail_SimpleSystemMail" library:readonly="false" library:passwordprotected="false">
-"<library:element library:name="smplmail_SimpleSystemMail"/>
-"</library:library>
diff --git a/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/smplmail_SimpleSystemMail.xba b/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/smplmail_SimpleSystemMail.xba
deleted file mode 100644
index faaf7396a18d..000000000000
--- a/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/smplmail_SimpleSystemMail.xba
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="smplmail_SimpleSystemMail" script:language="StarBasic">
-
-
-'*************************************************************************
-'
-' Licensed to the Apache Software Foundation (ASF) under one
-' or more contributor license agreements. See the NOTICE file
-' distributed with this work for additional information
-' regarding copyright ownership. The ASF licenses this file
-' to you under the Apache License, Version 2.0 (the
-' "License"); you may not use this file except in compliance
-' with the License. You may obtain a copy of the License at
-'
-' http://www.apache.org/licenses/LICENSE-2.0
-'
-' Unless required by applicable law or agreed to in writing,
-' software distributed under the License is distributed on an
-' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-' KIND, either express or implied. See the License for the
-' specific language governing permissions and limitations
-' under the License.
-'
-'*************************************************************************
-
-
-
-
-
-' Be sure that all variables are dimensioned:
-option explicit
-
-
-
-Sub CreateObj()
-
-'*************************************************************************
-' COMPONENT:
-' smplmail.SimpleSystemMail
-'*************************************************************************
-On Error Goto ErrHndl
- if (GetGuiType() = GUI_TYPE_WINDOWS) then
- Out.Log("OS is Win : trying to create service ...")
- oDoc = createUNOService("com.sun.star.system.SimpleSystemMail")
- oObj = oDoc
- else
- Out.Log("OS is not Win : service is not available ...")
- Out.Log("Creating Dummy object to avoid error in BasicBridge ...")
- oObj = createUnoService("com.sun.star.io.Pipe")
- Test.skipObjectCheck()
- endif
-Exit Sub
-ErrHndl:
- Test.Exception()
-End Sub
-</script:module>
diff --git a/qadevOOo/tests/java/ifc/system/_XSimpleMailClientSupplier.java b/qadevOOo/tests/java/ifc/system/_XSimpleMailClientSupplier.java
deleted file mode 100644
index ded04beefe0a..000000000000
--- a/qadevOOo/tests/java/ifc/system/_XSimpleMailClientSupplier.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-package ifc.system;
-
-import lib.MultiMethodTest;
-import lib.Status;
-
-import com.sun.star.system.XSimpleMailClient;
-import com.sun.star.system.XSimpleMailClientSupplier;
-
-
-/**
-* Testing <code>com.sun.star.system.XSimpleMailClientSupplier</code>
-* interface methods :
-* <ul>
-* <li><code> querySimpleMailClient()</code></li>
-* </ul> <p>
-* This test needs the following object relations :
-* <ul>
-* <li> <code>'SystemMailExist'</code> (of type <code>Boolean</code>):
-* if <code>true</code> then <code>SimpleSystemMail</code> service
-* is available, if NOT then the service is not availabel or
-* OS doesn't has system mail.</li>
-* <ul> <p>
-* @see com.sun.star.system.XSimpleMailClientSupplier
-*/
-public class _XSimpleMailClientSupplier extends MultiMethodTest {
-
- public XSimpleMailClientSupplier oObj = null;
-
- /**
- * Test calls the method if the <code>SimpleSystemMail</code>
- * service is available on current OS. <p>
- * Has <b> OK </b> status if not null value returned or
- * has <b>SKIPPED.OK</b> status if SystemMail is not available. <p>
- */
- public void _querySimpleMailClient() {
- if (Boolean.TRUE.equals
- ((Boolean)tEnv.getObjRelation("SystemMailExist"))) {
-
- XSimpleMailClient aClient = oObj.querySimpleMailClient();
- tRes.tested("querySimpleMailClient()",aClient != null);
- } else {
- log.println("SystemMail doesn't exist : nothing to test") ;
- tRes.tested("querySimpleMailClient()", Status.skipped(true)) ;
- }
- }
-
-
-} // finish class _XSimpleMailClientSupplier
-
-
diff --git a/qadevOOo/tests/java/mod/_cmdmail/SimpleCommandMail.java b/qadevOOo/tests/java/mod/_cmdmail/SimpleCommandMail.java
deleted file mode 100644
index 114338f0b34d..000000000000
--- a/qadevOOo/tests/java/mod/_cmdmail/SimpleCommandMail.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-package mod._cmdmail;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.XInterface;
-
-public class SimpleCommandMail extends TestCase {
-
- public TestEnvironment createTestEnvironment( TestParameters Param,
- PrintWriter log )
- throws StatusException {
- XInterface oObj = null;
- Object oInterface = null;
-
- try {
- XMultiServiceFactory xMSF = (XMultiServiceFactory)Param.getMSF();
- oInterface = xMSF.createInstance
- ( "com.sun.star.comp.system.SimpleCommandMail" );
-
- if (oInterface == null) log.println("!!! NULL !!!") ;
- }
- catch( com.sun.star.uno.Exception e ) {
- log.println("Can't create an object." );
- throw new StatusException( "Can't create an object", e );
- }
-
- oObj = (XInterface) oInterface;
-
- log.println("ImplementationName: "+util.utils.getImplName(oObj));
-
- TestEnvironment tEnv = new TestEnvironment( oObj );
-
- return tEnv;
-
- } // finish method getTestEnvironment
-
-}
-
diff --git a/qadevOOo/tests/java/mod/_smplmail/SimpleSystemMail.java b/qadevOOo/tests/java/mod/_smplmail/SimpleSystemMail.java
deleted file mode 100644
index 26f6a6e66c38..000000000000
--- a/qadevOOo/tests/java/mod/_smplmail/SimpleSystemMail.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-package mod._smplmail;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.XInterface;
-
-/**
- * Test for object which is represented by service
- * <code>com.sun.star.system.SimpleSystemMail</code>. <p>
- *
- * Object implements the following interfaces :
- * <ul>
- * <li> <code>com::sun::star::system::XSimpleMailClientSupplier</code></li>
- * <li> <code>com::sun::star::lang::XServiceInfo</code></li>
- * <li> <code>com::sun::star::lang::XTypeProvider</code></li>
- * </ul> <p>
- *
- * This object test <b> is NOT </b> designed to be run in several
- * threads concurently.
- *
- * @see com.sun.star.system.XSimpleMailClientSupplier
- * @see com.sun.star.lang.XServiceInfo
- * @see com.sun.star.lang.XTypeProvider
- * @see ifc.system._XSimpleMailClientSupplier
- * @see ifc.lang._XServiceInfo
- * @see ifc.lang._XTypeProvider
- */
-public class SimpleSystemMail extends TestCase {
-
- /**
- * Creating a Testenvironment for the interfaces to be tested.
- * In case if OS is Win or not specified tries to create an instance
- * of the service <code>com.sun.star.system.SimpleSystemMail</code>. <p>
- *
- * Object relations created :
- * <ul>
- * <li> <code>'SystemMailExist'</code> for
- * {@link ifc.system._XSimpleMailClientSupplier} :
- * the value depends on tested platform and
- * <code>test.system.mail.isExist</code> INI
- * parameter.</li>
- * </ul>
- */
- public TestEnvironment createTestEnvironment( TestParameters Param,
- PrintWriter log )
- throws StatusException {
- XInterface oObj = null;
- Object oInterface = null;
- boolean isWinOS = false ;
- boolean isSystemMailExist = false ;
-
- // if 'OS' parameter is not defined then by default
- // Win platform is used. If really not the error will occurs.
- isWinOS = Param.get("OS") == null ||
- "wntmsci".equals(Param.get("OS")) ;
- isSystemMailExist = "true".equalsIgnoreCase
- ((String) Param.get("test.system.mail.isExist")) ;
-
- XMultiServiceFactory xMSF = (XMultiServiceFactory)Param.getMSF();
- try {
- if (isWinOS) {
- log.println("The OS is Win : trying to create service");
- oInterface = xMSF.createInstance
- ( "com.sun.star.system.SimpleSystemMail" );
- } else {
- log.println("The OS is NOT Win, SKIPPING this component");
- log.println("Creating Dummy object ...");
- oInterface = xMSF.createInstance( "com.sun.star.io.Pipe" );
- }
- } catch( com.sun.star.uno.Exception e ) {
- log.println("Can't create an object." );
- throw new StatusException( "Can't create an object", e );
- }
-
- oObj = (XInterface) oInterface;
-
- log.println("ImplementationName: "+util.utils.getImplName(oObj));
-
- TestEnvironment tEnv = new TestEnvironment( oObj );
-
- tEnv.addObjRelation("SystemMailExist", new Boolean(isSystemMailExist));
-
- return tEnv;
-
- } // finish method getTestEnvironment
-
-} // finish class SimpleSystemMail
-