2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 import lib
.MultiMethodTest
;
24 import com
.sun
.star
.system
.XSimpleMailClient
;
25 import com
.sun
.star
.system
.XSimpleMailClientSupplier
;
29 * Testing <code>com.sun.star.system.XSimpleMailClientSupplier</code>
32 * <li><code> querySimpleMailClient()</code></li>
34 * This test needs the following object relations :
36 * <li> <code>'SystemMailExist'</code> (of type <code>Boolean</code>):
37 * if <code>true</code> then <code>SimpleSystemMail</code> service
38 * is available, if NOT then the service is not available or
39 * OS doesn't has system mail.</li>
41 * @see com.sun.star.system.XSimpleMailClientSupplier
43 public class _XSimpleMailClientSupplier
extends MultiMethodTest
{
45 public XSimpleMailClientSupplier oObj
= null;
48 * Test calls the method if the <code>SimpleSystemMail</code>
49 * service is available on current OS. <p>
50 * Has <b> OK </b> status if not null value returned or
51 * has <b>SKIPPED.OK</b> status if SystemMail is not available. <p>
53 public void _querySimpleMailClient() {
54 if (Boolean
.TRUE
.equals
55 (tEnv
.getObjRelation("SystemMailExist"))) {
57 XSimpleMailClient aClient
= oObj
.querySimpleMailClient();
58 tRes
.tested("querySimpleMailClient()",aClient
!= null);
60 log
.println("SystemMail doesn't exist : nothing to test") ;
61 tRes
.tested("querySimpleMailClient()", Status
.skipped(true)) ;
66 } // finish class _XSimpleMailClientSupplier