diff options
Diffstat (limited to 'qadevOOo/tests/java/ifc/sdb')
19 files changed, 114 insertions, 114 deletions
diff --git a/qadevOOo/tests/java/ifc/sdb/_DataAccessDescriptor.java b/qadevOOo/tests/java/ifc/sdb/_DataAccessDescriptor.java index e829acf98d5b..8ac12a3bba8b 100644 --- a/qadevOOo/tests/java/ifc/sdb/_DataAccessDescriptor.java +++ b/qadevOOo/tests/java/ifc/sdb/_DataAccessDescriptor.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ public class _DataAccessDescriptor extends MultiPropertyTest { log.println("set property to a new value..."); oObj.setPropertyValue(propName, newValue); - + log.println("get the new value..."); XResultSet getValue = (XResultSet) UnoRuntime.queryInterface(XResultSet.class,oObj.getPropertyValue(propName)); @@ -66,7 +66,7 @@ public class _DataAccessDescriptor extends MultiPropertyTest { log.println("Property '" + propName + "' is optional and not supported"); tRes.tested(propName,true); - + } else { log.println("could not get property '"+ propName +"' from XPropertySet!"); tRes.tested(propName, false); @@ -92,7 +92,7 @@ public class _DataAccessDescriptor extends MultiPropertyTest { log.println("set property to a new value..."); oObj.setPropertyValue(propName, newValue); - + log.println("get the new value..."); XConnection getValue = (XConnection) UnoRuntime.queryInterface(XConnection.class,oObj.getPropertyValue(propName)); @@ -109,7 +109,7 @@ public class _DataAccessDescriptor extends MultiPropertyTest { log.println("Property '" + propName + "' is optional and not supported"); tRes.tested(propName,true); - + } else { log.println("could not get property '"+ propName +"' from XPropertySet!"); tRes.tested(propName, false); @@ -119,7 +119,7 @@ public class _DataAccessDescriptor extends MultiPropertyTest { tRes.tested(propName, false); } } - + } diff --git a/qadevOOo/tests/java/ifc/sdb/_DataSource.java b/qadevOOo/tests/java/ifc/sdb/_DataSource.java index 735ad17f0d81..dc275fe5df7a 100644 --- a/qadevOOo/tests/java/ifc/sdb/_DataSource.java +++ b/qadevOOo/tests/java/ifc/sdb/_DataSource.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_DatasourceAdministrationDialog.java b/qadevOOo/tests/java/ifc/sdb/_DatasourceAdministrationDialog.java index d3eca94c6556..9d62bab6405c 100644 --- a/qadevOOo/tests/java/ifc/sdb/_DatasourceAdministrationDialog.java +++ b/qadevOOo/tests/java/ifc/sdb/_DatasourceAdministrationDialog.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_ErrorMessageDialog.java b/qadevOOo/tests/java/ifc/sdb/_ErrorMessageDialog.java index 581e4c59ecdd..f9af42b69173 100644 --- a/qadevOOo/tests/java/ifc/sdb/_ErrorMessageDialog.java +++ b/qadevOOo/tests/java/ifc/sdb/_ErrorMessageDialog.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,7 +58,7 @@ public class _ErrorMessageDialog extends MultiPropertyTest { testProperty("SQLException", tEnv.getObjRelation("ERR1"), tEnv.getObjRelation("ERR2")) ; } - + public void _ParentWindow(){ log.println("Testing with custom Property tester"); testProperty("ParentWindow", tEnv.getObjRelation("ERR_XWindow"), null); diff --git a/qadevOOo/tests/java/ifc/sdb/_QueryDefinition.java b/qadevOOo/tests/java/ifc/sdb/_QueryDefinition.java index 593420423a0b..a87733c044ff 100644 --- a/qadevOOo/tests/java/ifc/sdb/_QueryDefinition.java +++ b/qadevOOo/tests/java/ifc/sdb/_QueryDefinition.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_RowSet.java b/qadevOOo/tests/java/ifc/sdb/_RowSet.java index 367b353d0f68..593092780a1e 100644 --- a/qadevOOo/tests/java/ifc/sdb/_RowSet.java +++ b/qadevOOo/tests/java/ifc/sdb/_RowSet.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -119,15 +119,15 @@ public class _RowSet extends MultiPropertyTest { boolean result = false; try { XConnection the_connection = null; - + try { the_connection = (XConnection) AnyConverter.toObject( new Type(XConnection.class), oObj.getPropertyValue("ActiveConnection")); } catch (com.sun.star.lang.IllegalArgumentException iae) { throw new StatusException("couldn't convert Any",iae); - } - + } + result = (the_connection != null); } catch (com.sun.star.beans.UnknownPropertyException e) { log.println("the property is unknown"); diff --git a/qadevOOo/tests/java/ifc/sdb/_SingleSelectQueryComposer.java b/qadevOOo/tests/java/ifc/sdb/_SingleSelectQueryComposer.java index e7fb46e65055..0ccbf0420602 100644 --- a/qadevOOo/tests/java/ifc/sdb/_SingleSelectQueryComposer.java +++ b/qadevOOo/tests/java/ifc/sdb/_SingleSelectQueryComposer.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_XBookmarksSupplier.java b/qadevOOo/tests/java/ifc/sdb/_XBookmarksSupplier.java index 135188848a7f..47a1f501224e 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XBookmarksSupplier.java +++ b/qadevOOo/tests/java/ifc/sdb/_XBookmarksSupplier.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_XCompletedConnection.java b/qadevOOo/tests/java/ifc/sdb/_XCompletedConnection.java index 8dc2192ab057..6d36198bfa0f 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XCompletedConnection.java +++ b/qadevOOo/tests/java/ifc/sdb/_XCompletedConnection.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_XCompletedExecution.java b/qadevOOo/tests/java/ifc/sdb/_XCompletedExecution.java index 2710085b3281..3d1c28c6aea0 100755 --- a/qadevOOo/tests/java/ifc/sdb/_XCompletedExecution.java +++ b/qadevOOo/tests/java/ifc/sdb/_XCompletedExecution.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ public class _XCompletedExecution extends MultiMethodTest { // oObj filled by MultiMethodTest public XCompletedExecution oObj = null ; - + private CheckInteractionHandler checkHandler = null; /** * Interface to implement so the call of the listener can be checked. @@ -64,7 +64,7 @@ public class _XCompletedExecution extends MultiMethodTest { checkHandler.setLog((PrintWriter)log); } - + public void _executeWithCompletion() { try { oObj.executeWithCompletion(checkHandler); @@ -74,7 +74,7 @@ public class _XCompletedExecution extends MultiMethodTest { tRes.tested("executeWithCompletion()", false); return; } - + tRes.tested("executeWithCompletion()", checkHandler.checkInteractionHandler()); } diff --git a/qadevOOo/tests/java/ifc/sdb/_XFormDocumentsSupplier.java b/qadevOOo/tests/java/ifc/sdb/_XFormDocumentsSupplier.java index b4a415bc3ac1..b8985324e96a 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XFormDocumentsSupplier.java +++ b/qadevOOo/tests/java/ifc/sdb/_XFormDocumentsSupplier.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_XParametersSupplier.java b/qadevOOo/tests/java/ifc/sdb/_XParametersSupplier.java index 109bb24c4462..865c3f15e47f 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XParametersSupplier.java +++ b/qadevOOo/tests/java/ifc/sdb/_XParametersSupplier.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_XQueryDefinitionsSupplier.java b/qadevOOo/tests/java/ifc/sdb/_XQueryDefinitionsSupplier.java index 942da74cc999..2c9d83716d2f 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XQueryDefinitionsSupplier.java +++ b/qadevOOo/tests/java/ifc/sdb/_XQueryDefinitionsSupplier.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_XReportDocumentsSupplier.java b/qadevOOo/tests/java/ifc/sdb/_XReportDocumentsSupplier.java index 75b7c2f51a0a..2abe69303961 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XReportDocumentsSupplier.java +++ b/qadevOOo/tests/java/ifc/sdb/_XReportDocumentsSupplier.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_XResultSetAccess.java b/qadevOOo/tests/java/ifc/sdb/_XResultSetAccess.java index 7f68a57d0b1c..29711bff9f33 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XResultSetAccess.java +++ b/qadevOOo/tests/java/ifc/sdb/_XResultSetAccess.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_XRowSetApproveBroadcaster.java b/qadevOOo/tests/java/ifc/sdb/_XRowSetApproveBroadcaster.java index 2993b60fe19a..cd4a0490559b 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XRowSetApproveBroadcaster.java +++ b/qadevOOo/tests/java/ifc/sdb/_XRowSetApproveBroadcaster.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/sdb/_XSQLErrorBroadcaster.java b/qadevOOo/tests/java/ifc/sdb/_XSQLErrorBroadcaster.java index 47facc31805e..2b5d7f1513a7 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XSQLErrorBroadcaster.java +++ b/qadevOOo/tests/java/ifc/sdb/_XSQLErrorBroadcaster.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,6 +33,6 @@ import lib.MultiMethodTest; * */ public class _XSQLErrorBroadcaster extends MultiMethodTest { - + public XSQLErrorBroadcaster oObj = null; } diff --git a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java index 5b7dca9342f4..cc88075a9b8b 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java +++ b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,9 +60,9 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { public XSingleSelectQueryAnalyzer oObj = null ; private String queryString = "SELECT * FROM \"biblio\""; - + private XSingleSelectQueryComposer xComposer = null; - + /** * Recieves the object relations: * <ul> @@ -79,9 +79,9 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { if (xComposer == null) { throw new StatusException(Status.failed( "Couldn't get object relation 'xComposer'. Test must be modified")); - + } - + } /** * call <code>setQuery()</code> once with valid query, once with invalid @@ -94,7 +94,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { } catch (com.sun.star.sdbc.SQLException e){ log.println("expected Exception. "); } - + try{ oObj.setQuery(queryString); } catch (com.sun.star.sdbc.SQLException e){ @@ -103,7 +103,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { } tRes.tested("setQuery()", true); } - + /** * checks of the returned value of <code>getQuery()</code> * equals the string which was set by <code>setQuery()</code> @@ -117,13 +117,13 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { this.requiredMethod("setQuery()"); boolean res = false; - + res = oObj.getQuery().equals(queryString); - + tRes.tested("getQuery()", res); } - - + + /** * Object relation <code>xComposer</code> set a filter. This filter * must returned while calling <code>getFilter</code> @@ -133,13 +133,13 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { String filter = "\"Identifier\" = 'BOR02b'"; xComposer.setFilter(filter); tRes.tested("getFilter()", (oObj.getFilter().equals(filter))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("getFilter()", false); } } - + /** * Object relation <code>xComposer</code> set a complex filter with method . <code>setFilter</code>. Then <code>getStructuredFilter</code> returns a @@ -164,7 +164,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { xComposer.setFilter(""); xComposer.setStructuredFilter(aStructuredFilter); tRes.tested("getStructuredFilter()", (oObj.getFilter().equals(complexFilter))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("getStructuredFilter()", false); @@ -173,7 +173,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { tRes.tested("getStructuredFilter()", false); } } - + /** * Object relation <code>xComposer</code> set a goup. This group * must returned while calling <code>getGroup</code> @@ -183,25 +183,25 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { String group = "\"Identifier\""; xComposer.setGroup(group); tRes.tested("getGroup()", (oObj.getGroup().equals(group))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("getGroup()", false); } } - + /** * Method <code>getGroupColumns</code> retunrs a <code>XIndexAccess</code> * Test has ok status if returned value is an useable <code>XIndexAccess</code> */ public void _getGroupColumns() { try{ - XIndexAccess xGroupColumns = oObj.getGroupColumns(); - - tRes.tested("getGroupColumns()", (xGroupColumns != null && - xGroupColumns.getCount() == 1 && + XIndexAccess xGroupColumns = oObj.getGroupColumns(); + + tRes.tested("getGroupColumns()", (xGroupColumns != null && + xGroupColumns.getCount() == 1 && xGroupColumns.getByIndex(0) != null)); - + } catch (com.sun.star.lang.IndexOutOfBoundsException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("getGroupColumns()", false); @@ -210,7 +210,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { tRes.tested("getGroupColumns()", false); } } - + /** * Object relation <code>xComposer</code> set a clause. This clause * must returned while calling <code>getHavingClause</code> @@ -221,13 +221,13 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { xComposer.setHavingClause(clause); tRes.tested("getHavingClause()", ( oObj.getHavingClause().equals(clause))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("getHavingClause()", false); } } - + /** * Object relation <code>xComposer</code> set a clause. This clause * must returned while calling <code>getHavingClause</code> @@ -244,21 +244,21 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { requiredMethod("getFilter()"); executeMethod("getStructuredFilter()"); String complexFilter = "( \"Identifier\" = '1' AND \"Type\" = '4' ) OR ( \"Identifier\" = '2' AND \"Type\" = '5' ) OR ( \"Identifier\" = '3' AND \"Type\" = '6' AND \"Address\" = '7' ) OR ( \"Address\" = '8' ) OR ( \"Type\" = '9' )"; - + try{ xComposer.setHavingClause(complexFilter); PropertyValue[][] aStructuredHaving = oObj.getStructuredHavingClause(); xComposer.setHavingClause(""); xComposer.setStructuredHavingClause(aStructuredHaving); - tRes.tested("getStructuredHavingClause()", + tRes.tested("getStructuredHavingClause()", (oObj.getHavingClause().equals(complexFilter))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("getStructuredHavingClause()", false); } } - + /** * Object relation <code>xComposer</code> set an order. This order * must returned while calling <code>getOrder</code> @@ -268,13 +268,13 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { String order = "\"Identifier\""; xComposer.setOrder(order); tRes.tested("getOrder()", (oObj.getOrder().equals(order))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("getOrder()", false); } } - + /** * Method <code>getGroupColumns</code> retunrs a <code>XIndexAccess</code> * Test has ok status if returned value is an useable <code>XIndexAccess</code> @@ -282,10 +282,10 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { public void _getOrderColumns() { try{ XIndexAccess xOrderColumns = oObj.getOrderColumns(); - tRes.tested("getOrderColumns()", (xOrderColumns != null && - xOrderColumns.getCount() == 1 && + tRes.tested("getOrderColumns()", (xOrderColumns != null && + xOrderColumns.getCount() == 1 && xOrderColumns.getByIndex(0) != null)); - + } catch (com.sun.star.lang.IndexOutOfBoundsException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("getOrderColumns()", false); @@ -294,6 +294,6 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { tRes.tested("getOrderColumns()", false); } } - + } // finish class _XSingleSelectQueryAnalyzer diff --git a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java index fa987a09a227..12562abde2b9 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java +++ b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,13 +62,13 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { public XSingleSelectQueryComposer oObj = null ; private String queryString = "SELECT * FROM \"biblio\""; - + private XSingleSelectQueryAnalyzer xQueryAna = null; - + private XPropertySet xProp = null; - + private String colName = null; - + /** * Retcieves the object relations: * <ul> @@ -88,9 +88,9 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { if (xQueryAna == null) { throw new StatusException(Status.failed( "Couldn't get object relation 'xQueryAna'. Test must be modified")); - + } - + xProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, tEnv.getObjRelation("xProp")); @@ -98,9 +98,9 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { if (xProp == null) { throw new StatusException(Status.failed( "Couldn't get object relation 'xProp'. Test must be modified")); - + } - + try { colName = AnyConverter.toString(tEnv.getObjRelation("colName")); @@ -113,12 +113,12 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { if (colName == null) { throw new StatusException(Status.failed( "Couldn't get object relation 'colName'. Test must be modified")); - + } - + } - - + + /** * Object relation <code>xQueryAna</code> set a filter. This filter * must returned while calling <code>getFilter</code> @@ -128,13 +128,13 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { String filter = "\"Identifier\" = 'BOR02b'"; oObj.setFilter(filter); tRes.tested("setFilter()", (xQueryAna.getFilter().equals(filter))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("setFilter()", false); } } - + /** * Object relation <code>xQueryAna</code> set a complex filter with method . <code>setFilter</code>. Then <code>getStructuredFilter</code> returns a @@ -152,7 +152,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { oObj.setFilter(""); oObj.setStructuredFilter(aStructuredFilter); tRes.tested("setStructuredFilter()", (xQueryAna.getFilter().equals(complexFilter))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("setStructuredFilter()", false); @@ -161,10 +161,10 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { tRes.tested("setStructuredFilter()", false); } } - + /** - * At first the object relation <code>xProp</code> was set as parameter. - * Relation <code>xQueryAna</code> was used to chek if realtion + * At first the object relation <code>xProp</code> was set as parameter. + * Relation <code>xQueryAna</code> was used to chek if realtion * <code>colName</code> was found. * Second an empty <code>XPropertySet</code> was used as parameter. A * <code>com.sun.star.sdbc.SQLException</code> must be thrown. @@ -172,22 +172,22 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { public void _appendFilterByColumn() { boolean ok = true; try{ - + oObj.appendFilterByColumn(xProp, true,SQLFilterOperator.EQUAL); log.println("appendFilterByColumn: " + xQueryAna.getFilter()); ok = ok && (xQueryAna.getFilter().indexOf(colName) > 0); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("appendFilterByColumn()", false); } try{ - + oObj.appendFilterByColumn(xProp, false,SQLFilterOperator.EQUAL); log.println("appendFilterByColumn: " + xQueryAna.getFilter()); ok = ok && (xQueryAna.getFilter().indexOf(colName) > 0); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("appendFilterByColumn()", false); @@ -198,7 +198,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { oObj.appendFilterByColumn(dummy, true,SQLFilterOperator.EQUAL); log.println("expected Exception was not thrown"); tRes.tested("appendFilterByColumn()", false); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("expected Exception"); ok = ok && true; @@ -216,11 +216,11 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { public void _appendGroupByColumn() { boolean ok = true; try{ - + oObj.appendGroupByColumn(xProp); log.println("appendGroupByColumn: " + xQueryAna.getFilter()); ok = ok && (xQueryAna.getFilter().indexOf(colName) > 0); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("appendGroupByColumn()", false); @@ -230,17 +230,17 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { oObj.appendGroupByColumn(dummy); log.println("expected Exception was not thrown"); tRes.tested("appendGroupByColumn()", false); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("expected Exception"); ok = ok && true; } - tRes.tested("appendGroupByColumn()", ok); + tRes.tested("appendGroupByColumn()", ok); } /** * The group which was setted by <code>setGroup</code> must be returned - * while calling from object relation <code>XQueryAna</code> + * while calling from object relation <code>XQueryAna</code> * method <code>getGroup</code> */ public void _setGroup() { @@ -248,17 +248,17 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { String group = "\"Identifier\""; oObj.setGroup(group); tRes.tested("setGroup()", (xQueryAna.getGroup().equals(group))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("setGroup()", false); } } - - + + /** * The cluase which was setted by <code>setHavingClause</code> must be returned - * while calling from object relation <code>XQueryAna</code> + * while calling from object relation <code>XQueryAna</code> * method <code>getHavingClause</code> */ public void _setHavingClause() { @@ -267,17 +267,17 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { oObj.setHavingClause(clause); tRes.tested("setHavingClause()", ( xQueryAna.getHavingClause().equals(clause))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("setHavingClause()", false); } } - + /** * At first <code>setHavingClause</code> sets a complex clause. * Then method <code>getStructuredHavingClause</code> from object relation - * <code>xQueryAna</code> returns a valid <code>PropertyValue[][]</code> + * <code>xQueryAna</code> returns a valid <code>PropertyValue[][]</code> * Method <code>setHavingClause</code> was called with an empty sting to * reset filter. Now <code>setStructuredHavingClause</code> with the valid * <code>PropertyValue[][]</code> as parameter was called. @@ -294,16 +294,16 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { requiredMethod("setHavingClause()"); executeMethod("setStructuredFilter()"); String complexFilter = "( \"Identifier\" = '1' AND \"Type\" = '4' ) OR ( \"Identifier\" = '2' AND \"Type\" = '5' ) OR ( \"Identifier\" = '3' AND \"Type\" = '6' AND \"Address\" = '7' ) OR ( \"Address\" = '8' ) OR ( \"Type\" = '9' )"; - + try{ oObj.setHavingClause(complexFilter); - PropertyValue[][] aStructuredHaving = + PropertyValue[][] aStructuredHaving = xQueryAna.getStructuredHavingClause(); oObj.setHavingClause(""); oObj.setStructuredHavingClause(aStructuredHaving); - tRes.tested("setStructuredHavingClause()", + tRes.tested("setStructuredHavingClause()", (xQueryAna.getHavingClause().equals(complexFilter))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("setStructuredHavingClause()", false); @@ -320,11 +320,11 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { public void _appendHavingClauseByColumn() { boolean ok = true; try{ - + oObj.appendHavingClauseByColumn(xProp, true,SQLFilterOperator.EQUAL); log.println("appendHavingClauseByColumn: " + xQueryAna.getFilter()); ok = ok && (xQueryAna.getFilter().indexOf(colName) > 0); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("appendHavingClauseByColumn()", false); @@ -334,7 +334,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { oObj.appendHavingClauseByColumn(dummy, true,SQLFilterOperator.EQUAL); log.println("expected Exception was not thrown"); tRes.tested("appendHavingClauseByColumn()", false); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("expected Exception"); ok = ok && true; @@ -352,11 +352,11 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { public void _appendOrderByColumn() { boolean ok = true; try{ - + oObj.appendOrderByColumn(xProp, true); log.println("appendOrderByColumn: " + xQueryAna.getFilter()); ok = ok && (xQueryAna.getFilter().indexOf(colName) > 0); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("appendOrderByColumn()", false); @@ -366,7 +366,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { oObj.appendOrderByColumn(dummy, true); log.println("expected Exception was not thrown"); tRes.tested("appendOrderByColumn()", false); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("expected Exception"); ok = ok && true; @@ -384,13 +384,13 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { String order = "\"Identifier\""; oObj.setOrder(order); tRes.tested("setOrder()", (xQueryAna.getOrder().equals(order))); - + } catch (com.sun.star.sdbc.SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("setOrder()", false); } } - - + + } // finish class _XSingleSelectQueryComposer |