DatabaseTest fixture

Flow-type fixture which enables users to connect, control transactions, set fixture symbols (store/recall) and invoke other fixtures (automatically passing the appropriate DBEnvironment object). Following methods are supported:

QueryExecutes a query and tests query results with Query fixture (order of expected results is ignored)
OrderedQuerySimilar to Query, but order of expected results is important
InsertExecutes inserts into a table or view using Insert fixture
ExecuteExecutes a SQL statement using Execute
ExecuteProcedureExecutes a stored procedure or function using ExecuteProcedure
ExecuteProcedureExpectExceptionExecutes a stored procedure or function using ExecuteProcedure,but expects that an exception will be thrown. Optionally exception/error code can be specified as the second argument
CommitCommits the current transaction and starts a new one
RollbackCancels the current transaction and starts a new one
ConnectCreates a new database connection to be used in the tests; if it has one parameter, then the parameter is a full connection string. If three parameters are used the first is the data source, second and third are username and password. Optional fourth parameter can be a database name (if required, as in SQL server)
ConnectUsingFileCreates a new database connection to be used in the tests; connection properties are read from a file on the server. Specify the file path, either absolute or relative to run.bat, as the argument. see connection properties file
InspectQueryInspects a query using Inspect Fixture. Specify the query as the second argument
InspectProcedureInspects a stored procedure using Inspect Fixture. Specify the procedure name as the second argument
InspectTableInspects a table using Inspect Fixture. Specify the table name as the second argument
InspectViewInspects a view using Inspect Fixture. Specify the view name as the second argument

Personal Tools