Skip to content

Commit 8c0719b

Browse files
authored
update README (#12)
1 parent 9634ce3 commit 8c0719b

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,27 @@ The macro will generate the following test methods.
119119
}
120120
```
121121

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+
122137
## Features
123138

124139
- [x] Primitive types as input values (like Int, Double, String and Bool)
125140
- [x] Custom objects as input values (like structs, classes and enums)
126141
- [x] Diagnostics for error handling
127-
- [ ] Expected output array of objects/values
142+
- [x] Expected output array of objects/values
128143
- [ ] Labels for paramter values like: `@Parametrize(input: [3.14, 2.71], labels: ["pi", "e"])`
129144

130145
## License

0 commit comments

Comments
 (0)