/* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * 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 .
*/
/** * Testing <code>com.sun.star.frame.XModuleManager</code> * interface methods: * <ul> * <li><code> identify() </code></li> * </ul><p> * This test needs the following object relations : * <ul> * <li> <code>'XModuleManager.XFrame'</code> (of type <code>PropertyValue[]</code>): * PropertyValue[n].Value : a XFrame * PropertyValue[n].Name : the expected return value of <code>identify()</code></li> * <li> <code>'XModuleManager.XController'</code> (of type <code>PropertyValue[]</code>): * PropertyValue[n].Value : a XController * PropertyValue[n].Name : the expected return value of <code>identify()</code></li> * <li> <code>'XModuleManager.XModel'</code> (of type <code>PropertyValue[]</code>): * PropertyValue[n].Value : a XFrame * PropertyValue[n].Name : the expected return value of <code>identify()</code></li> * </ul> <p> * Test is <b> NOT </b> multithread compliant. <p> * @see com.sun.star.frame.XModuleManager
*/ publicclass _XModuleManager extends MultiMethodTest { /** Test calls the method. <p> * The object relations <CODE>XModuleManager.XFrame</CODE>, * <CODE>XModuleManager.XController</CODE> and <CODE>XModuleManager.XModel</CODE> * are sequences of <CODE>PropertyValue</CODE>. The value of a PropertyValue * contains a <CODE>XFrame</CODE>, <CODE>XController</CODE> or a * <CODE>XModel</CODE>. The name of the PropertyValue contains the expected return * value of method <CODE>indetify()</CODE> if the method was called with * corresponding value.<p> * As enhancement the method <CODE>identify()</CODE> was called with invalid * parameter. In this case the thrown exceptions were caught.
*/ public XModuleManager oObj = null; /** * Test calls the method. <p> * Has <b> OK </b> status if the method returns expected values, that's equal to * previously obtained object relation 'Frame'. * The following method tests are to be completed successfully before: * <ul> * <li> <code> attachFrame() </code> : attaches frame obtained object * relation 'Frame' </li> * </ul>
*/
if (xModelSeq == null) thrownew StatusException
(Status.failed("Relation 'xModelSeq' not found.")) ;
}
/* The method <CODE>identify()</CODE> was used for every entry in sequence of * object relations.
*/ publicvoid _identify() { boolean ok = true;
log.println("testing frame sequence...");
ok &= testSequence(xFrameSeq);
log.println("testing controller sequence...");
ok &= testSequence(xControllerSeq);
log.println("testing model sequence...");
ok &= testSequence(xModelSeq);
tRes.tested("identify()", ok);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.