Update ooo320-m1
[ooovba.git] / qadevOOo / tests / java / ifc / sdbc / _RowSet.java
blobc40a2362740c255a884970793425dd7a8cc9b544
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: _RowSet.java,v $
10 * $Revision: 1.5 $
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.sdbc;
33 import lib.MultiPropertyTest;
35 import com.sun.star.uno.Any;
38 /**
39 * Testing <code>com.sun.star.sdbc.RowSet</code>
40 * service properties :
41 * <ul>
42 * <li><code> DataSourceName</code></li>
43 * <li><code> URL</code></li>
44 * <li><code> Command</code></li>
45 * <li><code> TransactionIsolation</code></li>
46 * <li><code> TypeMap</code></li>
47 * <li><code> EscapeProcessing</code></li>
48 * <li><code> QueryTimeOut</code></li>
49 * <li><code> MaxFieldSize</code></li>
50 * <li><code> MaxRows</code></li>
51 * <li><code> User</code></li>
52 * <li><code> Password</code></li>
53 * <li><code> ResultSetType</code></li>
54 * </ul> <p>
55 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
56 * @see com.sun.star.sdbc.RowSet
58 public class _RowSet extends MultiPropertyTest {
60 /**
61 * Redefined method returns object, that contains changed property value.
63 public void _TypeMap() {
64 boolean result = false;
65 try {
66 Any TypeMap = (Any) oObj.getPropertyValue("TypeMap");
67 String TypeName = TypeMap.getType().getTypeName();
68 String expected = "com.sun.star.container.XNameAccess";
69 result = TypeName.equals(expected);
70 if (! result ) {
71 log.println("Expected Type is "+expected);
72 log.println("but the returned is "+TypeName);
74 } catch(com.sun.star.lang.WrappedTargetException e) {
75 log.println("Exception " + e.getMessage());
76 } catch(com.sun.star.beans.UnknownPropertyException e) {
77 log.println("Exception " + e.getMessage());
80 tRes.tested("TypeMap",result);
83 } // finish class _RowSet