-
Notifications
You must be signed in to change notification settings - Fork 2
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
[COR-123] Support records #157
Conversation
src/LeanCode.ContractsGenerator.Tests/ExampleBased/Properties.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also add a test for a record being command/query/opertation.
Plus, this needs fixing.
Also, forgot about it - changelog change is needed :) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #157 +/- ##
==========================================
+ Coverage 81.76% 81.97% +0.20%
==========================================
Files 37 37
Lines 1300 1315 +15
Branches 127 130 +3
==========================================
+ Hits 1063 1078 +15
Misses 190 190
Partials 47 47
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
public record DTO1(int Property); | ||
public record DTO2(string Property); | ||
|
||
public class Command : ICommand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that we should check if this will work:
public record Command(DTO1 DTO1) : ICommand;
et al. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, didn't think about this one, but it looks like it works as well
Assumed, that we do not want clients to have distinction between record type DTOs and class type DTOs.