summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/basic/ifc/sdb
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/basic/ifc/sdb')
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/DataAccessDescriptor/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/DataAccessDescriptor/sdb_DataAccessDescriptor.xba81
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/DataSource/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/DataSource/sdb_DataSource.xba111
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/DatasourceAdministrationDialog/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/DatasourceAdministrationDialog/sdb_DatasourceAdministrationDialog.xba59
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/ErrorMessageDialog/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/ErrorMessageDialog/sdb_ErrorMessageDialog.xba74
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/QueryDefinition/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/QueryDefinition/sdb_QueryDefinition.xba66
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/RowSet/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/RowSet/sdb_RowSet.xba100
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XBookmarksSupplier/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XBookmarksSupplier/sdb_XBookmarksSupplier.xba63
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XCompletedConnection/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XCompletedConnection/sdb_XCompletedConnection.xba64
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XQueryDefinitionsSupplier/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XQueryDefinitionsSupplier/sdb_XQueryDefinitionsSupplier.xba61
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XResultSetAccess/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XResultSetAccess/sdb_XResultSetAccess.xba60
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XRowSetApproveBroadcaster/script.xlb5
-rw-r--r--qadevOOo/tests/basic/ifc/sdb/XRowSetApproveBroadcaster/sdb_XRowSetApproveBroadcaster.xba214
22 files changed, 1008 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/ifc/sdb/DataAccessDescriptor/script.xlb b/qadevOOo/tests/basic/ifc/sdb/DataAccessDescriptor/script.xlb
new file mode 100644
index 000000000000..cd1568bef490
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/DataAccessDescriptor/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+ <library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_DataAccessDescriptor" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="sdb_DataAccessDescriptor"/>
+ </library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/DataAccessDescriptor/sdb_DataAccessDescriptor.xba b/qadevOOo/tests/basic/ifc/sdb/DataAccessDescriptor/sdb_DataAccessDescriptor.xba
new file mode 100644
index 000000000000..9f00da7b7379
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/DataAccessDescriptor/sdb_DataAccessDescriptor.xba
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_DataAccessDescriptor" script:language="StarBasic">
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+'*************************************************************************
+' This Interface/Service test depends on the following GLOBAL variables,
+' which must be specified in the object creation:
+
+' NONE
+
+'*************************************************************************
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.sdb.DataAccessDescriptor
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+
+ PropertyTester.TestProperty("DataSourceName")
+
+ PropertyTester.TestProperty("ActiveConnection")
+
+ PropertyTester.TestProperty("Command")
+
+ PropertyTester.TestProperty("CommandType")
+
+ PropertyTester.TestProperty("Filter")
+
+ PropertyTester.TestProperty("EscapeProcessing")
+
+ PropertyTester.TestProperty("ResultSet")
+
+ PropertyTester.TestProperty("Selection", Array(Array(2,4), Array(1,3)))
+
+ PropertyTester.TestProperty("BookmarkSelection")
+
+ PropertyTester.TestProperty("ColumnName")
+
+ PropertyTester.TestProperty("Column")
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/DataSource/script.xlb b/qadevOOo/tests/basic/ifc/sdb/DataSource/script.xlb
new file mode 100644
index 000000000000..2e4c15e4a7b8
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/DataSource/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_DataSource" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_DataSource"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/DataSource/sdb_DataSource.xba b/qadevOOo/tests/basic/ifc/sdb/DataSource/sdb_DataSource.xba
new file mode 100644
index 000000000000..58894d625364
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/DataSource/sdb_DataSource.xba
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_DataSource" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+'*************************************************************************
+' This Interface/Service test depends on the following GLOBAL variables,
+' which must be specified in the object creation:
+
+' - SuppressVersionColumns
+' - IsReadOnly
+' - NumberFormatsSupplier
+' - TableFilter
+' - TableTypeFilter
+
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' SERVICE:
+' com.sun.star.sdb.DataSource
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim infoUsr as new com.sun.star.beans.PropertyValue
+ Dim infoPass as new com.sun.star.beans.PropertyValue
+ Dim bOk as Boolean
+
+ PropertyTester.TestProperty("Name")
+
+ PropertyTester.TestProperty("URL")
+
+ Test.StartMethod("Info")
+ props() = oObj.Info
+
+ infoUsr.Name = "user"
+ if ubound(props()) > -1 then
+ infoUsr.Value = "New" + props(0).Value
+ else
+ infoUsr.Value = "DataSourceUser"
+ endif
+
+ infoPass.Name = "password"
+ infoPass.Value = "DataSourcePasswd"
+
+ newProps = Array(infoUsr, infoPass)
+ oObj.Info = newProps
+ getProps() = oObj.Info
+ Out.Log("ubound = " + ubound(getProps()))
+
+ bOk = PropertyTester.equals(newProps, getProps)
+
+ Test.MethodTested("Info", bOk)
+
+ PropertyTester.TestProperty("User")
+
+ PropertyTester.TestProperty("Password")
+
+ PropertyTester.TestProperty("IsPasswordRequired")
+
+ PropertyTester.TestProperty("SuppressVersionColumns")
+
+ PropertyTester.TestProperty("IsReadOnly")
+
+ PropertyTester.TestProperty("NumberFormatsSupplier")
+
+ PropertyTester.TestProperty("TableFilter")
+
+ PropertyTester.TestProperty("TableTypeFilter")
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/DatasourceAdministrationDialog/script.xlb b/qadevOOo/tests/basic/ifc/sdb/DatasourceAdministrationDialog/script.xlb
new file mode 100644
index 000000000000..dd1009b2297b
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/DatasourceAdministrationDialog/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_DatasourceAdministrationDialog" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_DatasourceAdministrationDialog"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/DatasourceAdministrationDialog/sdb_DatasourceAdministrationDialog.xba b/qadevOOo/tests/basic/ifc/sdb/DatasourceAdministrationDialog/sdb_DatasourceAdministrationDialog.xba
new file mode 100644
index 000000000000..db42fb893ad7
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/DatasourceAdministrationDialog/sdb_DatasourceAdministrationDialog.xba
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_DatasourceAdministrationDialog" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' SERVICE:
+' com.sun.star.sdb.DatasourceAdministrationDialog
+'*************************************************************************
+On Error Goto ErrHndl
+
+ PropertyTester.TestProperty("Title")
+
+ PropertyTester.TestProperty("ParentWindow")
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/ErrorMessageDialog/script.xlb b/qadevOOo/tests/basic/ifc/sdb/ErrorMessageDialog/script.xlb
new file mode 100644
index 000000000000..9a2d6ef472df
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/ErrorMessageDialog/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_ErrorMessageDialog" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_ErrorMessageDialog"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/ErrorMessageDialog/sdb_ErrorMessageDialog.xba b/qadevOOo/tests/basic/ifc/sdb/ErrorMessageDialog/sdb_ErrorMessageDialog.xba
new file mode 100644
index 000000000000..734a5d250ac3
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/ErrorMessageDialog/sdb_ErrorMessageDialog.xba
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_ErrorMessageDialog" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+' Be sure that all variables are dimensioned:
+option explicit
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' SERVICE:
+' com.sun.star.sdb.ErrorMessageDialog
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim excep As Variant
+ Dim bOK As Boolean
+ Dim msg As String
+
+ PropertyTester.TestProperty("Title")
+
+ PropertyTester.TestProperty("ParentWindow")
+
+ Test.StartMethod("SQLException")
+ bOk = true
+ excep = oObj.SQLException
+ if isNull(excep) OR isEmpty(excep) then
+ Out.Log("Property is null and cann't be changed")
+ else
+ oObj.SQLException = NULL_OBJECT
+ excep = oObj.SQLException
+ bOk = bOK AND (isNull(excep) OR isEmpty(excep))
+ endIf
+ Test.MethodTested("SQLException", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/QueryDefinition/script.xlb b/qadevOOo/tests/basic/ifc/sdb/QueryDefinition/script.xlb
new file mode 100644
index 000000000000..be39aab5d1a8
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/QueryDefinition/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_QueryDefinition" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_QueryDefinition"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/QueryDefinition/sdb_QueryDefinition.xba b/qadevOOo/tests/basic/ifc/sdb/QueryDefinition/sdb_QueryDefinition.xba
new file mode 100644
index 000000000000..86723d3d00f8
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/QueryDefinition/sdb_QueryDefinition.xba
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_QueryDefinition" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' SERVICE:
+' com.sun.star.sdb.QueryDefinition
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+
+ PropertyTester.TestProperty("Name")
+
+ PropertyTester.TestProperty("Command")
+
+ PropertyTester.TestProperty("EscapeProcessing")
+
+ PropertyTester.TestProperty("UpdateTableName")
+
+ PropertyTester.TestProperty("UpdateCatalogName")
+
+ PropertyTester.TestProperty("UpdateSchemaName")
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/RowSet/script.xlb b/qadevOOo/tests/basic/ifc/sdb/RowSet/script.xlb
new file mode 100644
index 000000000000..e739bd7198ea
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/RowSet/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_RowSet" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_RowSet"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/RowSet/sdb_RowSet.xba b/qadevOOo/tests/basic/ifc/sdb/RowSet/sdb_RowSet.xba
new file mode 100644
index 000000000000..cc52b46be8fc
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/RowSet/sdb_RowSet.xba
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_RowSet" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' SERVICE:
+' com.sun.star.sdb.RowSet
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+
+ PropertyTester.TestProperty("ActiveConnection")
+
+ PropertyTester.TestProperty("DataSourceName")
+
+ PropertyTester.TestProperty("Command")
+
+ Test.StartMethod("CommandType")
+ bOK = true
+ oldVal = oObj.CommandType
+ Out.Log("value before: "+oldVal)
+ if (oldVal &lt;&gt; 9999) then
+ oObj.CommandType = 9999
+ else
+ oObj.CommandType = 10000
+ endif
+ newVal = oObj.CommandType
+ Out.Log("value after: "+newVal)
+ bOK = bOK AND (newVal &lt;&gt; oldVal)
+ Test.MethodTested("CommandType",bOK)
+
+ PropertyTester.TestProperty("ActiveCommand")
+
+ PropertyTester.TestProperty("IgnoreResult")
+
+ PropertyTester.TestProperty("Filter")
+
+ PropertyTester.TestProperty("ApplyFilter")
+
+ PropertyTester.TestProperty("Order")
+
+ PropertyTester.TestProperty("Privileges")
+
+ PropertyTester.TestProperty("IsModified")
+
+ PropertyTester.TestProperty("IsNew")
+
+ PropertyTester.TestProperty("RowCount")
+
+ PropertyTester.TestProperty("IsRowCountFinal")
+
+ PropertyTester.TestProperty("UpdateTableName")
+
+ PropertyTester.TestProperty("UpdateCatalogName")
+
+ PropertyTester.TestProperty("UpdateSchemaName")
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XBookmarksSupplier/script.xlb b/qadevOOo/tests/basic/ifc/sdb/XBookmarksSupplier/script.xlb
new file mode 100644
index 000000000000..150ca7de9f49
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XBookmarksSupplier/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_XBookmarksSupplier" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_XBookmarksSupplier"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XBookmarksSupplier/sdb_XBookmarksSupplier.xba b/qadevOOo/tests/basic/ifc/sdb/XBookmarksSupplier/sdb_XBookmarksSupplier.xba
new file mode 100644
index 000000000000..691dbc25aaca
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XBookmarksSupplier/sdb_XBookmarksSupplier.xba
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_XBookmarksSupplier" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.sdb.XBookmarksSupplier
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+ Dim bkMrks as Variant
+
+
+ Test.StartMethod("getBookmarks()")
+ bOK = true
+ bkMrks = oObj.getBookmarks()
+ bOK = bOK AND (NOT isNull(bkMrks))
+ if NOT bOK then Out.Log("The method returned NULL")
+ bOK = bOK AND hasUNOInterfaces(bkMrks, "com.sun.star.container.XNameAccess")
+ Test.MethodTested("getBookmarks()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XCompletedConnection/script.xlb b/qadevOOo/tests/basic/ifc/sdb/XCompletedConnection/script.xlb
new file mode 100644
index 000000000000..2ee70813f92a
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XCompletedConnection/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_XCompletedConnection" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_XCompletedConnection"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XCompletedConnection/sdb_XCompletedConnection.xba b/qadevOOo/tests/basic/ifc/sdb/XCompletedConnection/sdb_XCompletedConnection.xba
new file mode 100644
index 000000000000..b8254ddb5e2a
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XCompletedConnection/sdb_XCompletedConnection.xba
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_XCompletedConnection" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.sdb.XCompletedConnection
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+ ReCreateObj()
+
+ Test.StartMethod("connectWithCompletion()")
+ bOK = true
+ Dim oIH As Object
+ Dim oConnection As Object
+ oIH = createUnoService("com.sun.star.sdb.InteractionHandler")
+ oConnection = oObj.connectWithCompletion(oIH)
+ bOK = bOK AND hasUnoInterfaces(oConnection, "com.sun.star.sdbc.XConnection")
+ Test.MethodTested("connectWithCompletion()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XQueryDefinitionsSupplier/script.xlb b/qadevOOo/tests/basic/ifc/sdb/XQueryDefinitionsSupplier/script.xlb
new file mode 100644
index 000000000000..30016fad8059
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XQueryDefinitionsSupplier/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_XQueryDefinitionsSupplier" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_XQueryDefinitionsSupplier"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XQueryDefinitionsSupplier/sdb_XQueryDefinitionsSupplier.xba b/qadevOOo/tests/basic/ifc/sdb/XQueryDefinitionsSupplier/sdb_XQueryDefinitionsSupplier.xba
new file mode 100644
index 000000000000..1d3a69bffea1
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XQueryDefinitionsSupplier/sdb_XQueryDefinitionsSupplier.xba
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_XQueryDefinitionsSupplier" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.sdb.XQueryDefinitionsSupplier
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+
+ Test.StartMethod("getQueryDefinitions()")
+ bOK = true
+ Dim oQD As Object
+ oQD = oObj.getQueryDefinitions()
+ bOK = bOK AND hasUnoInterfaces(oQD, "com.sun.star.container.XNameAccess"
+ Test.MethodTested("getQueryDefinitions()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XResultSetAccess/script.xlb b/qadevOOo/tests/basic/ifc/sdb/XResultSetAccess/script.xlb
new file mode 100644
index 000000000000..2f4becc94f61
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XResultSetAccess/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_XResultSetAccess" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_XResultSetAccess"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XResultSetAccess/sdb_XResultSetAccess.xba b/qadevOOo/tests/basic/ifc/sdb/XResultSetAccess/sdb_XResultSetAccess.xba
new file mode 100644
index 000000000000..cbbb70f067d1
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XResultSetAccess/sdb_XResultSetAccess.xba
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_XResultSetAccess" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.sdb.XResultSetAccess
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+
+ Test.StartMethod("createResultSet()")
+ bOK = true
+ oResultSet = oObj.createResultSet()
+ bOK = bOK AND hasUnoInterfaces(oResultSet, "com.sun.star.sdbc.XResultSet")
+ Test.MethodTested("createResultSet()", bOK)
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+</script:module>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XRowSetApproveBroadcaster/script.xlb b/qadevOOo/tests/basic/ifc/sdb/XRowSetApproveBroadcaster/script.xlb
new file mode 100644
index 000000000000..d5f0289de9ce
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XRowSetApproveBroadcaster/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="sdb_XRowSetApproveBroadcaster" library:readonly="false" library:passwordprotected="false">
+"<library:element library:name="sdb_XRowSetApproveBroadcaster"/>
+"</library:library>
diff --git a/qadevOOo/tests/basic/ifc/sdb/XRowSetApproveBroadcaster/sdb_XRowSetApproveBroadcaster.xba b/qadevOOo/tests/basic/ifc/sdb/XRowSetApproveBroadcaster/sdb_XRowSetApproveBroadcaster.xba
new file mode 100644
index 000000000000..ba32a84bb2b3
--- /dev/null
+++ b/qadevOOo/tests/basic/ifc/sdb/XRowSetApproveBroadcaster/sdb_XRowSetApproveBroadcaster.xba
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sdb_XRowSetApproveBroadcaster" script:language="StarBasic">
+
+
+'*************************************************************************
+'
+' 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
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'*************************************************************************
+'*************************************************************************
+
+
+
+
+Dim iApproveCursorMove1 As Integer
+Dim iApproveCursorMove2 As Integer
+Dim iApproveRowChange1 As Integer
+Dim iApproveRowChange2 As Integer
+Dim iApproveRowSetChange1 As Integer
+Dim iApproveRowSetChange2 As Integer
+
+
+Sub RunTest()
+
+'*************************************************************************
+' INTERFACE:
+' com.sun.star.sdb.XRowSetApproveBroadcaster
+'*************************************************************************
+On Error Goto ErrHndl
+ Dim bOK As Boolean
+
+ Dim oListener1 As Object
+ Dim oListener2 As Object
+ Dim cOrigStr As String
+ Dim cPrevStr As String
+
+ oObj.first()
+ cOrigStr = oObj.getString(1)
+
+ Out.Log("Creating two XRowSetApproveListeners")
+ oListener1 = createUnoListener("CB1_", "com.sun.star.sdb.XRowSetApproveListener")
+ oListener2 = createUnoListener("CB2_", "com.sun.star.sdb.XRowSetApproveListener")
+
+ ResetCounters()
+
+ Test.StartMethod("addRowSetApproveListener()")
+ bOK = true
+ oObj.addRowSetApproveListener(oListener1)
+ oObj.addRowSetApproveListener(oListener2)
+
+ bOK = bOK AND Expected(0, 0, 0, 0, 0, 0)
+
+ Out.Log("Call oObj.execute() - change RowSet")
+ oObj.execute()
+ bOK = bOK AND Expected(0, 0, 0, 0, 1, 1)
+
+ ResetCounters()
+ Out.Log("Call oObj.next() - move cursor")
+ oObj.next()
+ bOK = bOK AND Expected(1, 1, 0, 0, 0, 0)
+
+ Out.Log("Call oObj.updateString() - updating RowSet")
+ oObj.first()
+ ResetCounters()
+ cPrevStr = oObj.getString(1)
+ Out.Log(cPrevStr)
+ oObj.updateString(1, cPrevStr + "+")
+ oObj.updateRow()
+ Out.Log(oObj.getString(1))
+ bOK = bOK AND Expected(0, 0, 1, 1, 0, 0)
+ bOK = bOK AND oObj.getString(1) = cPrevStr + "+"
+
+ Test.MethodTested("addRowSetApproveListener()", bOK)
+
+ ResetCounters()
+
+ Test.StartMethod("removeRowSetApproveListener()")
+ bOK = true
+ Out.Log("Removing only first listener")
+ oObj.removeRowSetApproveListener(oListener1)
+
+ bOK = bOK AND Expected(0, 0, 0, 0, 0, 0)
+
+ Out.Log("Call oObj.execute() - change RowSet")
+ oObj.execute()
+ bOK = bOK AND Expected(0, 0, 0, 0, 0, 1)
+
+ ResetCounters()
+ Out.Log("Call oObj.next() - move cursor")
+ oObj.next()
+ bOK = bOK AND Expected(0, 1, 0, 0, 0, 0)
+
+ ResetCounters()
+ Out.Log("Call oObj.updateString() - updating RowSet")
+ oObj.first()
+ cPrevStr = oObj.getString(1)
+ Out.Log(cPrevStr)
+ oObj.updateString(1, cPrevStr + "+")
+ oObj.updateRow()
+ Out.Log(oObj.getString(1))
+ bOK = bOK AND Expected(0, 0, 0, 1, 0, 0)
+ bOK = bOK AND oObj.getString(1) = cPrevStr + "+"
+
+ Test.MethodTested("removeRowSetApproveListener()", bOK)
+
+ Out.Log("Removing last listener")
+ oObj.removeRowSetApproveListener(oListener2)
+
+ Out.Log("Returning first row back...")
+ oObj.first()
+ oObj.updateString(1, cOrigStr)
+ oObj.updateRow()
+
+Exit Sub
+ErrHndl:
+ Test.Exception()
+ bOK = false
+ resume next
+End Sub
+Function CB1_approveCursorMove(oEvent As Object) As Boolean
+ Out.Log("callback function approveCursorMove() for Listener1 was called!")
+ iApproveCursorMove1 = iApproveCursorMove1 + 1
+ CB1_approveCursorMove() = true
+End Function
+
+Function CB2_approveCursorMove(oEvent As Object) As Boolean
+ Out.Log("callback function approveCursorMove() for Listener2 was called!")
+ iApproveCursorMove2 = iApproveCursorMove2 + 1
+ CB2_approveCursorMove() = true
+End Function
+
+Function CB1_approveRowChange(oEvent As Object) As Boolean
+ Out.Log("callback function approveRowChange() for Listener1 was called!")
+ iApproveRowChange1 = iApproveRowChange1 + 1
+ CB1_approveRowChange() = true
+End Function
+
+Function CB2_approveRowChange(oEvent As Object) As Boolean
+ Out.Log("callback function approveRowChange() for Listener2 was called!")
+ iApproveRowChange2 = iApproveRowChange2 + 1
+ CB2_approveRowChange() = true
+End Function
+
+Function CB1_approveRowSetChange(oEvent As Object) As Boolean
+ Out.Log("callback function approveRowSetChange() for Listener1 was called!")
+ iApproveRowSetChange1 = iApproveRowSetChange1 + 1
+ CB1_approveRowSetChange() = true
+End Function
+
+Function CB2_approveRowSetChange(oEvent As Object) As Boolean
+ Out.Log("callback function approveRowSetChange() for Listener2 was called!")
+ iApproveRowSetChange2 = iApproveRowSetChange2 + 1
+ CB2_approveRowSetChange() = true
+End Function
+
+Sub ResetCounters()
+ Out.Log("Reset counters...")
+ iApproveCursorMove1 = 0
+ iApproveCursorMove2 = 0
+ iApproveRowChange1 = 0
+ iApproveRowChange2 = 0
+ iApproveRowSetChange1 = 0
+ iApproveRowSetChange2 = 0
+End Sub
+
+Function Expected(iApprCursorMove1 As Integer, iApprCursorMove2 As Integer, _
+ iApprRowChange1 As Integer, iApprRowChange2 As Integer, _
+ iApprRowSetChange1 As Integer, iApprRowSetChange2 As Integer) As Boolean
+Dim bOK As Boolean
+ bOK = true
+
+ bOK = bOK AND Expected1("approveCursorMove()", 1, iApproveCursorMove1, iApprCursorMove1)
+ bOK = bOK AND Expected1("approveCursorMove()", 2, iApproveCursorMove2, iApprCursorMove2)
+ bOK = bOK AND Expected1("approveRowChange()", 1, iApproveRowChange1, iApprRowChange1)
+ bOK = bOK AND Expected1("approveRowChange()", 2, iApproveRowChange2, iApprRowChange2)
+ bOK = bOK AND Expected1("apprRowSetChange()", 1, iApproveRowSetChange1, iApprRowSetChange1)
+ bOK = bOK AND Expected1("apprRowSetChange()", 2, iApproveRowSetChange2, iApprRowSetChange2)
+ Expected() = bOK
+End Function
+
+Function Expected1(fname As String, ln As Integer, val1 As Integer, val2 As Integer) As Boolean
+ Dim bOK As Integer
+
+ bOK = true
+ if (val1 &lt;&gt; val2) then
+ Out.Log(fname + " of Listener" + ln + " was called " + val1 + " time(s), "_
+ + "but it should be called " + val2 + " time(s).")
+ bOK = false
+ end if
+ Expected1() = bOK
+End Function
+</script:module>