1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 ' Copyright 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
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.
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).
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.
26 '/************************************************************************
28 '* owner : thorsten.bosbach@oracle.com
30 '* short description : general option test ( datasource - group )
32 '\******************************************************************************
34 testcase tDatasourceConnections
35 Dim lsTimeout ( 20 ) as String
36 Dim lbPool ( 20 ) as Boolean
37 Dim i as Integer, iCounter as Integer
42 iCounter = 9 ' sorry only hard coded the number of entries, it gives no way to get the real count ( GetText crashes )
43 qaerrorLog "GetTextCrasjhes??? TBO"
48 hToolsOptions ( "Datasources", "Connections" )
50 printlog " - save raw data"
51 bSave = ConnectionPoolingEnabled.IsChecked
52 ConnectionPoolingEnabled.Check
53 DriverList.TypeKeys "<Up>", 20
55 if i <> 1 then DriverList.TypeKeys "<Down>"
56 lbPool (i) = EnablePoolingForThisDriver.IsChecked
57 if lbPool (i) = TRUE then
58 lsTimeout (i) = Timeout.GetText
60 EnablePoolingForThisDriver.Check
61 lsTimeout (i) = Timeout.GetText
65 printlog " - change all settings"
66 DriverList.TypeKeys "<Up>", 20
68 if i <> 1 then DriverList.TypeKeys "<Down>"
70 if Instr ( sDiv, "." ) <> 0 or Instr ( sDiv, "," ) <> 0 then
71 EnablePoolingForThisDriver.Check
72 Timeout.SetText "4" + i
74 EnablePoolingForThisDriver.Uncheck
78 if bSave = TRUE then ConnectionPoolingEnabled.UnCheck
80 Kontext "ExtrasOptionenDlg"
85 printlog " - exit/restart StarOffice"
88 printlog " - check all changes"
90 hToolsOptions ( "Datasources", "Connections" )
92 if ConnectionPoolingEnabled.IsChecked = bSave then Warnlog "Connection pooling enabled => changes not saved!"
93 ConnectionPoolingEnabled.Check
95 DriverList.TypeKeys "<Up>", 20
97 if i <> 1 then DriverList.TypeKeys "<Down>"
99 if Instr ( sDiv, "." ) <> 0 or Instr ( sDiv, "," ) <> 0 then
100 if EnablePoolingForThisDriver.IsChecked <> TRUE then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
101 EnablePoolingForThisDriver.Check
102 if Timeout.GetText <> "4" + i then Warnlog "Entry " + i + " : timeout => changes not saved!"
104 if EnablePoolingForThisDriver.Ischecked = TRUE then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
109 printlog " - make second changes"
110 DriverList.TypeKeys "<Up>", 20
112 if i <> 1 then DriverList.TypeKeys "<Down>"
114 if Instr ( sDiv, "." ) <> 0 or Instr ( sDiv, "," ) <> 0 then
115 EnablePoolingForThisDriver.Uncheck
117 EnablePoolingForThisDriver.Check
119 Timeout.SetText "6" + i
121 Timeout.SetText "540"
127 Kontext "ExtrasOptionenDlg"
131 printlog " - check all changes"
133 hToolsOptions ( "Datasources", "Connections" )
135 DriverList.TypeKeys "<Up>", 20
137 if i <> 1 then DriverList.TypeKeys "<Down>"
139 if Instr ( sDiv, "." ) <> 0 or Instr ( sDiv, "," ) <> 0 then
140 if EnablePoolingForThisDriver.Ischecked = TRUE then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
142 if EnablePoolingForThisDriver.IsChecked <> TRUE then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
143 EnablePoolingForThisDriver.Check
145 if Timeout.GetText <> "6" + i then Warnlog "Entry " + i + " : timeout => changes not saved!"
147 if Timeout.GetText <> "540" then Warnlog "Entry " + i + " : timeout => changes not saved!"
154 printlog " - reset all settings"
155 DriverList.TypeKeys "<Up>", 20
157 if i <> 1 then DriverList.TypeKeys "<Down>"
158 EnablePoolingForThisDriver.Check
159 Timeout.SetText lsTimeout (i)
160 if lbPool (i) = TRUE then EnablePoolingForThisDriver.Check else EnablePoolingForThisDriver.UnCheck
162 if bSave = TRUE then ConnectionPoolingEnabled.Check else ConnectionPoolingEnabled.UnCheck
164 Kontext "ExtrasOptionenDlg"
168 printlog " - check the raw data"
170 hToolsOptions ( "Datasources", "Connections" )
172 ConnectionPoolingEnabled.check
173 DriverList.TypeKeys "<Up>", 20
175 if i <> 1 then DriverList.TypeKeys "<Down>"
176 if EnablePoolingForThisDriver.IsChecked <> lbPool (i) then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
177 EnablePoolingForThisDriver.Check
178 if Timeout.GetText <> lsTimeout (i) then Warnlog "Entry " + i + " : timeout => changes not saved!"
179 if lbPool (i) = TRUE then EnablePoolingForThisDriver.Check else EnablePoolingForThisDriver.UnCheck
182 ConnectionPoolingEnabled.unCheck
184 Kontext "ExtrasOptionenDlg"