DbSlim Wiki
Status: Alpha
Brought to you by:
mark1900
java -jar fitnesse.jar -p 4444
!define TEST_SYSTEM {slim}
!define COLLAPSE_SETUP {true}
!define COLLAPSE_TEARDOWN {true}
!path fitnesse-lib/**.jar
|import|
|fitnesse.slim.test|
|fitnesse.fixtures|
|slim|
| script | Db Slim Setup |!-oracle.jdbc.driver.OracleDriver-!| jdbc:oracle:thin:@host_name:1521:database_name | username | password |
!define currentCustomerId {101}
!define currentCustomerUsername {user101}
!define currentCustomerPassword {password101}
| script | Db Slim Update Query | Update customer_balances Set balance = 10000 Where customer_id = ${currentCustomerId} |
| check | rowsUpdated; | 1 |
|Query:Db Slim Update Query | Update customer_balances Set balance = 10000 Where customer_id = ${currentCustomerId} |
| rowsUpdated |
| 1 |
|Query:Db Slim Select Query | select * from customer_balances where customer_id = ${currentCustomerId}|
| customer_id | balance |
|${currentCustomerId}| 10000 |
!define dbQuerySelectCustomerbalance (
select * from customer_balances
where customer_id = ${currentCustomerId}
)
| script | Db Slim Select Query | ${dbQuerySelectCustomerbalance} |
| check | data; | 0 | 0 | ${currentCustomerId} |
| check | dataByColumnIndexAndRowIndex; | 0 | 0 | ${currentCustomerId} |
| check | data By Column Index | 0 | and Row Index | 0 | ${currentCustomerId} |
| check | data; | customer_id | 0 | ${currentCustomerId} |
| check | dataByColumnNameAndRowIndex; | customer_id | 0 | ${currentCustomerId} |
| check | dataByColumnNameAndRowIndex; | balance | 0 | >0 |
| $currentCustomerbalance= | dataByColumnNameAndRowIndex; | balance | 0 |
| check | dataByColumnNameAndRowIndex; | balance | 0 | $currentCustomerbalance |
| script | Db Slim Select Query | select * from customer_balances where customer_id = ${currentCustomerId} |
| check | dataByColumnNameAndRowIndex; | balance | 0 | $currentCustomerbalance |
|Query:Db Slim Select Query | select * from customer_balances where customer_id = ${currentCustomerId} |
| customer_id | balance |
|${currentCustomerId}| $currentCustomerbalance |
|comment|A comment|
| script | Db Slim Update Query | Update customer_balances Set balance = 10000 Where customer_id = ${currentCustomerId} |
| check | rowsUpdated; | 1 |