1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_test_XSimpleTest_idl__ 28#define __com_sun_star_test_XSimpleTest_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33 34#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 35#include <com/sun/star/lang/IllegalArgumentException.idl> 36#endif 37 38 39//============================================================================= 40 41module com { module sun { module star { module test { 42 43//============================================================================= 44/** 45 A simple interface to test a service or interface implementation. 46*/ 47published interface XSimpleTest: com::sun::star::uno::XInterface 48{ 49 //------------------------------------------------------------------------- 50 /** 51 Test the object TestObject against the test specified with TestName. This test 52 does not change the semantic state of the object, so it can be called on a existing 53 component that will used further on. 54 Note : This can be a strong test limitation. There are some components, that cannot 55 perform their full test scenario. 56 @param TestName the name of the test. Must be an interface, service or implementation name. 57 Note : The name is only used by the test component to distinguish 58 between test scenarios. 59 @param TestObject The instance to be tested. 60 61 @throws IllegalArgumentException 62 if the test does not support TestName or TestObject is null. 63 */ 64 void testInvariant( [in] string TestName, 65 [in] com::sun::star::uno::XInterface TestObject ) 66 raises( com::sun::star::lang::IllegalArgumentException ); 67 68 //------------------------------------------------------------------------- 69 /** 70 Test the object TestObject against the test specified with TestName. This test 71 changes the state of the object. The object may be useless afterwards. 72 (e.g. a closed XOutputStream). The method in general may be called multipe times with a new 73 test object instance. 74 Note : These tests should include the testInvariant test. 75 Note : Each test scenario should be independent of each other, so even if a scenario 76 didn't pass the test, the other test can still be performed. The error messages 77 are cumulative. 78 79 @param TestName The name of the test. Must be an interface, service or implementation name. 80 Note : The name is only used by the test component to distinguish 81 between test scenarios. 82 @param TestObject The instance to be tested. 83 @param hTestHandle Internal test handle. Handle for first test is always 0. 84 Handle of next test is returned by the method. 85 @return Handle of the next test. -1 if this was the last test. 86 87 @throws IllegalArgumentException 88 if the test does not support TestName or 89 TestObject is null. 90 */ 91 long test( [in] string TestName, 92 [in] com::sun::star::uno::XInterface TestObject, 93 [in] long hTestHandle ) 94 raises( com::sun::star::lang::IllegalArgumentException ); 95 96 //------------------------------------------------------------------------- 97 /**States if one of the last test has failed. This is cumulative. 98 @return true if all test have been passed succesfully. false if an error has occured. 99 100 */ 101 boolean testPassed(); 102 103 //------------------------------------------------------------------------- 104 // DOCUMENTATION MISSING FOR XSimpleTest::getErrors 105 sequence<string> getErrors(); 106 107 //------------------------------------------------------------------------- 108 // DOCUMENTATION MISSING FOR XSimpleTest::getErrorExceptions 109 sequence<any> getErrorExceptions(); 110 111 //------------------------------------------------------------------------- 112 // DOCUMENTATION MISSING FOR XSimpleTest::getWarnings 113 sequence<string> getWarnings(); 114 115}; 116 117//============================================================================= 118 119}; }; }; }; 120 121#endif 122