File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -119,12 +119,27 @@ The macro will generate the following test methods.
119
119
}
120
120
```
121
121
122
+ You can also specify array of expected values and use it in your test.
123
+
124
+ ``` swift
125
+ @Parametrize (
126
+ input: [APIEndpoint.profile ,
127
+ APIEndpoint.transactions ,
128
+ APIEndpoint.order (" 2345" )],
129
+ output: [" https://example.com/api/me" ,
130
+ " https://example.com/api/transactions" ,
131
+ " https://example.com/api/order/2345" ])
132
+ func testEndpointURL (input endpoint : APIEndpoint, output expectedUrl : String ) throws {
133
+ XCTAssertEqual (endpoint.buildURL ? .absoluteString , expectedUrl)
134
+ }
135
+ ```
136
+
122
137
## Features
123
138
124
139
- [x] Primitive types as input values (like Int, Double, String and Bool)
125
140
- [x] Custom objects as input values (like structs, classes and enums)
126
141
- [x] Diagnostics for error handling
127
- - [ ] Expected output array of objects/values
142
+ - [x ] Expected output array of objects/values
128
143
- [ ] Labels for paramter values like: ` @Parametrize(input: [3.14, 2.71], labels: ["pi", "e"]) `
129
144
130
145
## License
You can’t perform that action at this time.
0 commit comments