-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
117 additions
and
31 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
...bcSlim/UserGuide/1ASimpleExample/WritingGenericRequirementsWithAlias/SqlSetup/content.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#Copyright (C) 2015 by six42, All rights reserved. Contact the author via http://github.com/six42 | ||
# | ||
!|Define Properties|FindTestUserIDs | | ||
|key |value | | ||
|.include |TransactionDatabase | | ||
|cmd |select ID, NAME from TestData where Name ='%NAME%'| | ||
|
||
!|Define Properties|CheckInitalCityOfUsers | | ||
|key |value | | ||
|.include |TransactionDatabase | | ||
|cmd |select City from TestData where ID ='%ID%'| | ||
|
||
!|Define Properties|RelocateUserToNewCity | | ||
|key |value | | ||
|.include |TransactionDatabase | | ||
|cmd |update TestData set City='%NewCITY%' where ID ='%ID%'| | ||
|
||
!|Define Properties|CheckFinalCityOfUsers | | ||
|key |value | | ||
|.include |TransactionDatabase | | ||
|cmd |select City from TestData where ID ='%ID%'| | ||
|
||
|
||
!|Script|SQLCommand|FindTestUserIDs| | ||
|$FTU= |get fixture | | ||
|
||
!|Define alias | | ||
|find test users|table: $FTU| | ||
|
||
!|Script|SQLCommand|CheckInitalCityOfUsers| | ||
|$CICoU=|get fixture | | ||
|
||
!|Define alias | | ||
|check first city of users|table: $CICoU| | ||
|
||
!|Script|SQLCommand|RelocateUserToNewCity| | ||
|$RUTNC=|get fixture | | ||
|
||
!|Define alias | | ||
|relocate users|table: $RUTNC| | ||
|
||
!|Script|SQLCommand|CheckFinalCityOfUsers| | ||
|$CFCoU=|get fixture | | ||
|
||
!|Define alias | | ||
|Check city after relocation|table: $CFCoU| | ||
|
||
|
||
|
||
To avoid side effects we execute the test in a transaction | ||
!|Script|SQLCommand|TransactionDatabase| | ||
|open Connection | | ||
|execute|begin transaction | |
12 changes: 12 additions & 0 deletions
12
...lim/UserGuide/1ASimpleExample/WritingGenericRequirementsWithAlias/SqlSetup/properties.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<properties> | ||
<Edit>true</Edit> | ||
<Files>true</Files> | ||
<LastModifyingUser>six42</LastModifyingUser> | ||
<Properties>true</Properties> | ||
<RecentChanges>true</RecentChanges> | ||
<Refactor>true</Refactor> | ||
<Search>true</Search> | ||
<Versions>true</Versions> | ||
<WhereUsed>true</WhereUsed> | ||
</properties> |
14 changes: 14 additions & 0 deletions
14
...lim/UserGuide/1ASimpleExample/WritingGenericRequirementsWithAlias/SqlTearDown/content.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#Copyright (C) 2015 by six42, All rights reserved. Contact the author via http://github.com/six42 | ||
# | ||
!3 Rollback the change to not impact future tests | ||
|
||
!|Script|SQLCommand|TransactionDatabase|debug| | ||
|open Connection | | ||
|execute|rollback | | ||
|close Connection | | ||
|
||
!4 Check that the rollback worked | ||
!| SQLCommand|TransactionDatabase|select City from TestData where ID ='%ID%'| | ||
|ID |CITY? | | ||
|$TestID |Denver | | ||
|$TestID2 |Paris | |
13 changes: 13 additions & 0 deletions
13
.../UserGuide/1ASimpleExample/WritingGenericRequirementsWithAlias/SqlTearDown/properties.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<properties> | ||
<Edit>true</Edit> | ||
<Files>true</Files> | ||
<Help/> | ||
<Properties>true</Properties> | ||
<RecentChanges>true</RecentChanges> | ||
<Refactor>true</Refactor> | ||
<Search>true</Search> | ||
<Suites/> | ||
<Versions>true</Versions> | ||
<WhereUsed>true</WhereUsed> | ||
</properties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters