Skip to content

Commit 89aa8b6

Browse files
committed
Fix remaining context variable tests
1 parent 3db0d21 commit 89aa8b6

File tree

6 files changed

+112
-112
lines changed

6 files changed

+112
-112
lines changed

integrationtest/src/test/java/org/chorusbdd/chorus/selftest/choruscontext/choruscontext.feature

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ Feature: Check Chorus Context Handler
88
Scenario: Test Context Variables
99
Given Chorus is working properly
1010
And the context is empty
11-
And I create a variable varone with value 1.2
11+
And I create a context variable varone with value 1.2
1212
And I create a context variable vartwo with value wibble
13-
Then variable varone exists
13+
Then context variable varone exists
1414
And context variable vartwo exists
15-
And variable varone has the value 1.2
16-
And variable vartwo has the value wibble
17-
And I show variable varone
15+
And context variable varone has the value 1.2
16+
And context variable vartwo has the value wibble
17+
And I show context variable varone
1818
And I show context variable vartwo
1919

2020

2121
Scenario: Context Variables Are Cleared For Each Scenario
2222
Check the context is empty
2323

2424
Scenario: Context Variable Expansion into Steps
25-
Given I create a variable myVar with value wibble
26-
And I create a variable variable containing spaces with value value
25+
Given I create a context variable myVar with value wibble
26+
And I create a context variable variable containing spaces with value value
2727
Then I call a step passing the value ${myVar} and the variable gets expanded
2828
And I call a step passing the ${variable containing spaces} ${myVar} and the variables get expanded
2929

@@ -33,74 +33,74 @@ Feature: Check Chorus Context Handler
3333
#match a decimal point / floating point value
3434
#Where possible it seems a good idea to permit expanded values to match these simple captures even where
3535
#the underlying numeric type is floating point
36-
Given I create a variable floatWithNoDecimalPlaces with value 1.0
37-
Given I create a variable floatWithDecmialPlaces with value 1.2
36+
Given I create a context variable floatWithNoDecimalPlaces with value 1.0
37+
Given I create a context variable floatWithDecmialPlaces with value 1.2
3838
Then I call a step passing the value ${floatWithNoDecimalPlaces} and the variable gets expanded
3939
Then I call a step passing the value ${floatWithDecmialPlaces} and the variable gets expanded
4040

4141
Scenario: Mathematical operations simple floating point
42-
Given I create a variable myVar with value 1.2
43-
And the type of variable myVar is Double
44-
And I add the value 1.2 to myVar
45-
Then variable myVar has the value 2.4
46-
And the type of variable myVar is Double
42+
Given I create a context variable myVar with value 1.2
43+
And the type of context variable myVar is Double
44+
And I add the value 1.2 to the context variable myVar
45+
Then context variable myVar has the value 2.4
46+
And the type of context variable myVar is Double
4747

4848
Scenario: Mathematical operations promote integer to big decimal where required
49-
Given I create a variable myVar with value 1
50-
And the type of variable myVar is Long
51-
And I add the value 1.2 to myVar
52-
Then variable myVar has the value 2.2
53-
And the type of variable myVar is BigDecimal
49+
Given I create a context variable myVar with value 1
50+
And the type of context variable myVar is Long
51+
And I add the value 1.2 to the context variable myVar
52+
Then context variable myVar has the value 2.2
53+
And the type of context variable myVar is BigDecimal
5454

5555
Scenario: The numeric class type is immaterial when checking a numeric value
56-
Given I create a variable myVar with value 1
57-
And the type of variable myVar is Long
58-
Then variable myVar has the value 1.0
59-
And variable myVar has the value 1
56+
Given I create a context variable myVar with value 1
57+
And the type of context variable myVar is Long
58+
Then context variable myVar has the value 1.0
59+
And context variable myVar has the value 1
6060

6161
Scenario: Values which don't fit into Long are paresed as BigInteger
62-
Given I create a variable myVar with value 1000000000000000000000
63-
And the type of variable myVar is BigInteger
64-
Then the variable myVar has the value 1000000000000000000000.0
62+
Given I create a context variable myVar with value 1000000000000000000000
63+
And the type of context variable myVar is BigInteger
64+
Then the context variable myVar has the value 1000000000000000000000.0
6565

6666
Scenario: Adding values
67-
Given I create a variable myVar with value 1
68-
And I add 1000 to myVar
69-
Then the variable myVar has the value 1001
67+
Given I create a context variable myVar with value 1
68+
And I add 1000 to the context variable myVar
69+
Then the context variable myVar has the value 1001
7070

7171
Scenario: Subtracting values
72-
Given I create a variable myVar with value 1000
73-
And I subtract 50 from myVar
74-
Then the variable myVar has the value 950
72+
Given I create a context variable myVar with value 1000
73+
And I subtract 50 from the context variable myVar
74+
Then the context variable myVar has the value 950
7575

7676
Scenario: Multiplying values
77-
Given I create a variable myVar with value 1000
78-
And I multiply myVar by 5
79-
Then the variable myVar has the value 5000
77+
Given I create a context variable myVar with value 1000
78+
And I multiply the context variable myVar by 5
79+
Then the context variable myVar has the value 5000
8080

8181
Scenario: Multiplying values
82-
Given I create a variable myVar with value 10
83-
And I divide myVar by 5
84-
Then the variable myVar has the value 2
82+
Given I create a context variable myVar with value 10
83+
And I divide the context variable myVar by 5
84+
Then the context variable myVar has the value 2
8585

8686
#If we don't set maths context then any fractions which can't be represented perfectly in base 2 result in an error instead of rounding behaviour
8787
Scenario: Check maths context DECIMAL64 for divide
88-
Given I create a variable myVar with value 10
89-
And I divide myVar by 6
90-
Then the variable myVar has the value 1.666666666666667
88+
Given I create a context variable myVar with value 10
89+
And I divide the context variable myVar by 6
90+
Then the context variable myVar has the value 1.666666666666667
9191

9292
Scenario: Remainder
93-
Given I create a variable myVar with value 10
94-
And I divide myVar by 3 and take the remainder
95-
Then the variable myVar has the value 1
93+
Given I create a context variable myVar with value 10
94+
And I divide the context variable myVar by 3 and take the remainder
95+
Then the context variable myVar has the value 1
9696

9797
Scenario: Increment variable
98-
Given I create a variable myVar with value 10
99-
And I increment myVar
100-
Then the variable myVar has the value 11
98+
Given I create a context variable myVar with value 10
99+
And I increment the context variable myVar
100+
Then the context variable myVar has the value 11
101101

102102
Scenario: Decrement variable
103-
Given I create a variable myVar with value 10
104-
And I decrement myVar
105-
Then the variable myVar has the value 9
103+
Given I create a context variable myVar with value 10
104+
And I decrement the context variable myVar
105+
Then the context variable myVar has the value 9
106106

0 commit comments

Comments
 (0)