-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcomparisons.rigor
145 lines (130 loc) · 2.93 KB
/
comparisons.rigor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Comparisons
format: "1.0"
host: https://httpbin.org
scenarios:
- compare: equals
steps:
- description: Do a get just to do the comparison validations.
request:
path: /get
validate:
- actual: 1
compare: equals
expect: 1
- actual: '2'
compare: equals
expect: 2
- actual: 1
compare: '{scenario.compare}'
expect: 1
- actual: [1, 2]
compare: same
expect: [2, 1]
- actual: [1, 2, 3]
compare: not same
expect: [2, 1]
- actual: [1, 1]
compare: not same
expect: [1]
- actual: 2
compare: not equals
expect: 1
- actual: [1, 2, 3]
compare: contains
expect: 3
- actual: [1, 2, 3]
compare: not contains
expect: 4
- actual: 1
compare: in
expect: [1, 2, 3]
- actual: 4
compare: not in
expect: [1, 2, 3]
- actual: 4
compare: greater than
expect: 2
- actual: 4
compare: gt
expect: 2
- actual: 4
compare: greater than or equals
expect: 4
- actual: 4
compare: gte
expect: 4
- actual: 4
compare: less than
expect: 5
- actual: 4
compare: lt
expect: 5
- actual: 4
compare: less than or equals
expect: 4
- actual: 4
compare: lte
expect: 4
- actual: 1
compare: type
expect: int
- actual: 1.1
compare: type
expect: float
- actual: hello, world.
compare: type
expect: str
- actual: { first: "amelia", last: "earhart" }
compare: type
expect: dict
- actual: [2, 3]
compare: type
expect: list
- actual: '000-00-0000'
compare: regex
expect: \d{{3}}-\d{{2}}-\d{{4}}
- actual: John Q. Public
compare: regex
expect: \w+ \w\. \w+
- actual: [2, 3]
compare: length
expect: 2
- actual: []
compare: length
expect: 0
- actual: 'hello'
compare: length
expect: 5
- actual: [2]
compare: subset
expect: [2, 3]
- actual: [1, 2, 3]
compare: not subset
expect: [2, 3]
- actual: [1, 2, 3]
compare: superset
expect: [2, 3]
- actual: [2, 3]
compare: not superset
expect: [1, 2, 3]
- actual:
first_name: John
last_name: Doe
middle_name: Qunicy
age: 99
compare: keyset
expect:
- age
- first_name
- last_name
- middle_name
- actual:
first_name: John
last_name: Doe
middle_name: Qunicy
compare: not keyset
expect:
- age
- first_name
- last_name
- middle_name