Branch libreoffice-5-0-4
[LibreOffice.git] / qadevOOo / tests / java / ifc / system / _XSimpleMailClientSupplier.java
blobd5a3e5b96fef64cb0265af3368487c83dc48f406
1 /*
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 .
19 package ifc.system;
21 import lib.MultiMethodTest;
22 import lib.Status;
24 import com.sun.star.system.XSimpleMailClient;
25 import com.sun.star.system.XSimpleMailClientSupplier;
28 /**
29 * Testing <code>com.sun.star.system.XSimpleMailClientSupplier</code>
30 * interface methods :
31 * <ul>
32 * <li><code> querySimpleMailClient()</code></li>
33 * </ul> <p>
34 * This test needs the following object relations :
35 * <ul>
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 availablel or
39 * OS doesn't has system mail.</li>
40 * <ul> <p>
41 * @see com.sun.star.system.XSimpleMailClientSupplier
43 public class _XSimpleMailClientSupplier extends MultiMethodTest {
45 public XSimpleMailClientSupplier oObj = null;
47 /**
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);
59 } else {
60 log.println("SystemMail doesn't exist : nothing to test") ;
61 tRes.tested("querySimpleMailClient()", Status.skipped(true)) ;
66 } // finish class _XSimpleMailClientSupplier