-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- also adds tests to verify that beforeach/aftereach/setup and teardown are run as expected
- Loading branch information
George Cook
committed
Oct 1, 2018
1 parent
e9f42a4
commit 309dbb5
Showing
7 changed files
with
136 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Function BuildDate() | ||
return "Oct 1 2018 19:28:58" | ||
return "Oct 1 2018 19:47:45" | ||
End Function | ||
Function BuildCommit() | ||
return "91871e9" | ||
return "e9f42a4" | ||
End Function |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'@TestSuite [RBSA] Rooibos before after tests | ||
|
||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
'@It tests before each and after each are running | ||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
'@BeforeEach | ||
function RBSA__BeforeEach() as void | ||
? "!!! Before" | ||
end function | ||
|
||
|
||
'@AfterEach | ||
function RBSA__AfterEach() as void | ||
? "!!! After" | ||
end function | ||
|
||
'@Test before after | ||
function RBSA__before_after() as void | ||
|
||
assertResult = m.Fail("reason") | ||
|
||
isFail = m.currentResult.isFail | ||
m.currentResult.Reset() | ||
|
||
m.AssertFalse(assertResult) | ||
m.AssertTrue(isFail) | ||
end function |
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,100 @@ | ||
'@TestSuite [BEAER] BeforeEach and AfterEach Running | ||
|
||
'@Setup | ||
function BEAER_Setup() as void | ||
? "!!! Setup" | ||
end function | ||
|
||
|
||
'@TearDown | ||
function BEAER_TearDown() as void | ||
? "!!! TearDown" | ||
end function | ||
|
||
'@BeforeEach | ||
function BEAER_BeforeEach() as void | ||
? "!!! Before" | ||
end function | ||
|
||
|
||
'@AfterEach | ||
function BEAER_AfterEach() as void | ||
? "!!! After" | ||
end function | ||
|
||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
'@It tests group 1 - should have global before/after | ||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
'@Test 1 | ||
function BEAER_group1_1() as void | ||
m.AssertTrue(true) | ||
end function | ||
|
||
'@Test 2 | ||
function BEAER_group1_2() as void | ||
m.AssertTrue(true) | ||
end function | ||
|
||
'@Test 3 | ||
'@Params["a"] | ||
'@Params["b"] | ||
'@Params["c"] | ||
function BEAER_group1_3(values) as void | ||
m.AssertTrue(true) | ||
end function | ||
|
||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
'@It tests group 2 - should have group before after | ||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
'@BeforeEach | ||
function BEAER_group2_BeforeEach() as void | ||
? "!!! Before GROUP 2" | ||
end function | ||
|
||
|
||
'@AfterEach | ||
function BEAER_group2_AfterEach() as void | ||
? "!!! After GROUP 2" | ||
end function | ||
|
||
'@Test 1 | ||
function BEAER_group2_1() as void | ||
m.AssertTrue(true) | ||
end function | ||
|
||
'@Test 2 | ||
function BEAER_group2_2() as void | ||
m.AssertTrue(true) | ||
end function | ||
|
||
'@Test 3 | ||
'@Params["a"] | ||
'@Params["b"] | ||
'@Params["c"] | ||
function BEAER_group2_3(values) as void | ||
m.AssertTrue(true) | ||
end function | ||
|
||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
'@It tests group 3 - should have global before/after | ||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
'@Test 1 | ||
function BEAER_group3_1() as void | ||
m.AssertTrue(true) | ||
end function | ||
|
||
'@Test 2 | ||
function BEAER_group3_2() as void | ||
m.AssertTrue(true) | ||
end function | ||
|
||
'@Test 3 | ||
'@Params["a"] | ||
'@Params["b"] | ||
'@Params["c"] | ||
function BEAER_group3_3(values) as void | ||
m.AssertTrue(true) | ||
end function |
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