@@ -8,22 +8,22 @@ Feature: Check Chorus Context Handler
8
8
Scenario : Test Context Variables
9
9
Given Chorus is working properly
10
10
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
12
12
And I create a context variable vartwo with value wibble
13
- Then variable varone exists
13
+ Then context variable varone exists
14
14
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
18
18
And I show context variable vartwo
19
19
20
20
21
21
Scenario : Context Variables Are Cleared For Each Scenario
22
22
Check the context is empty
23
23
24
24
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
27
27
Then I call a step passing the value ${myVar} and the variable gets expanded
28
28
And I call a step passing the ${variable containing spaces} ${myVar} and the variables get expanded
29
29
@@ -33,74 +33,74 @@ Feature: Check Chorus Context Handler
33
33
#match a decimal point / floating point value
34
34
#Where possible it seems a good idea to permit expanded values to match these simple captures even where
35
35
#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
38
38
Then I call a step passing the value ${floatWithNoDecimalPlaces} and the variable gets expanded
39
39
Then I call a step passing the value ${floatWithDecmialPlaces} and the variable gets expanded
40
40
41
41
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
47
47
48
48
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
54
54
55
55
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
60
60
61
61
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
65
65
66
66
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
70
70
71
71
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
75
75
76
76
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
80
80
81
81
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
85
85
86
86
#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
87
87
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
91
91
92
92
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
96
96
97
97
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
101
101
102
102
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
106
106
0 commit comments