Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update README #12

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,27 @@ The macro will generate the following test methods.
}
```

You can also specify array of expected values and use it in your test.

```swift
@Parametrize(
input: [APIEndpoint.profile,
APIEndpoint.transactions,
APIEndpoint.order("2345")],
output: ["https://example.com/api/me",
"https://example.com/api/transactions",
"https://example.com/api/order/2345"])
func testEndpointURL(input endpoint: APIEndpoint, output expectedUrl: String) throws {
XCTAssertEqual(endpoint.buildURL?.absoluteString, expectedUrl)
}
```

## Features

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

## License
Expand Down