-
-
Notifications
You must be signed in to change notification settings - Fork 747
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
feat: added snapshot testing for generated code #1753
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1753 +/- ##
==========================================
- Coverage 87.73% 83.66% -4.07%
==========================================
Files 33 36 +3
Lines 2348 2443 +95
Branches 294 343 +49
==========================================
- Hits 2060 2044 -16
- Misses 208 316 +108
- Partials 80 83 +3 ☔ View full report in Codecov by Sentry. |
Net 4.7.2 is supported by Verify I would rather keep a lower end test than upper, would this be acceptable, the other option is to move the API Tests to a separate test project. |
Absolutely, no idea why I didn't use this version. Its a shame as I'd prefer to test the generated code for .NET 461 as its the most different version (Iirc
Which API tests are you talking about, are you talking about all the tests in I'm also not sure if my generator tests are even using .NET Framework, NET 6.0, NET 8.0 when running. AFAIK I'm tempted to close this PR and use it for testing a source generator rewrite (if I ever get round to it). Moving the tests from public async Task TestRouting()
{
// fixture adds this method into a blank refit interface file and verifies the output.
await Fixture.VerifyMethod(
"""
[Get("/group/{id}/users")]
Task<List<User>> GroupList([AliasAs("id")] int groupId, [AliasAs("sort")] string sortOrder);
""");
} |
The API test's are here -> Refit.Tests/API/ |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Created a separate file for snapshot testing the generated code.
Refit.Tests
to this project.