merge the formfield patch from ooo-build
[ooovba.git] / qadevOOo / tests / java / ifc / text / _XSentenceCursor.java
blob12bb7466a41ac037d467c8dfbad7b278386f0db5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _XSentenceCursor.java,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package ifc.text;
33 import lib.MultiMethodTest;
35 import com.sun.star.text.XSentenceCursor;
37 /**
38 * Testing <code>com.sun.star.text.XSentenceCursor</code>
39 * interface methods :
40 * <ul>
41 * <li><code> isStartOfSentence()</code></li>
42 * <li><code> isEndOfSentence()</code></li>
43 * <li><code> gotoNextSentence()</code></li>
44 * <li><code> gotoPreviousSentence()</code></li>
45 * <li><code> gotoStartOfSentence()</code></li>
46 * <li><code> gotoEndOfSentence()</code></li>
47 * </ul> <p>
48 * Test is <b> NOT </b> multithread compilant. <p>
49 * @see com.sun.star.text.XSentenceCursor
51 public class _XSentenceCursor extends MultiMethodTest {
53 public XSentenceCursor oObj = null; // oObj filled by MultiMethodTest
55 /**
56 * First goes to next sentence (to be sure that previous exists),
57 * then calls the method. <p>
59 * Has <b>OK</b> status if the method returns <code>true</code>.
61 public void _gotoPreviousSentence(){
62 oObj.gotoNextSentence(false);
63 oObj.gotoNextSentence(false);
64 tRes.tested("gotoPreviousSentence()", oObj.gotoPreviousSentence(false) );
67 /**
68 * First goes to previous sentence (to be sure that next exists),
69 * then calls the method. <p>
71 * Has <b>OK</b> status if the method returns <code>true</code>.
73 public void _gotoNextSentence(){
74 oObj.gotoPreviousSentence(false) ;
75 oObj.gotoPreviousSentence(false) ;
76 tRes.tested("gotoNextSentence()", oObj.gotoNextSentence(false) );
79 /**
80 * Test calls the method. <p>
81 * Has <b> OK </b> status if the method returns <code>true</code>. <p>
82 * The following method tests are to be completed successfully before :
83 * <ul>
84 * <li> <code> gotoPreviousSentence() </code> : to be sure the
85 * cursor is in range of some sentence. </li>
86 * </ul>
88 public void _gotoEndOfSentence(){
89 requiredMethod( "gotoPreviousSentence()" );
90 tRes.tested("gotoEndOfSentence()", oObj.gotoEndOfSentence(false) );
93 /**
94 * Test calls the method. <p>
95 * Has <b> OK </b> status if the method returns <code>true</code>. <p>
96 * The following method tests are to be completed successfully before :
97 * <ul>
98 * <li> <code> gotoPreviousSentence() </code> : to be sure the
99 * cursor is in range of some sentence. </li>
100 * </ul>
102 public void _gotoStartOfSentence(){
103 requiredMethod( "gotoPreviousSentence()" );
104 tRes.tested("gotoStartOfSentence()", oObj.gotoStartOfSentence(false) );
108 * First moves the cursor to the start of sentence and then calls
109 * the method. <p>
111 * Has <b>OK</b> status if the method returns <code>true</code>.
113 public void _isStartOfSentence(){
114 oObj.gotoStartOfSentence(false) ;
115 tRes.tested("isStartOfSentence()", oObj.isStartOfSentence() );
119 * First moves the cursor to the end of sentence and then calls
120 * the method. <p>
122 * Has <b>OK</b> status if the method returns <code>true</code>.
124 public void _isEndOfSentence(){
125 oObj.gotoEndOfSentence(false) ;
126 tRes.tested("isEndOfSentence()", oObj.isEndOfSentence() );
129 } // finish class _XSentenceCursor