Timeline for answer to Mock Atm program basic functions and xUnit unit test by forsvarir
Current License: CC BY-SA 4.0
Post Revisions
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 18, 2020 at 11:50 | comment | added | Rick Davin |
@SteveNgai With Nullable's, the preferred condition would be (!startDate.HasValue) rather than (startDate == null).
|
|
| Jun 18, 2020 at 8:34 | comment | added | forsvarir | @SteveNgai Then the error should be 'Either startDate and endDate should be supplied, or neither' ? Alternately, consider using the dates to filter if supplied (no error). So, all transactions before endDate if supplied, after startDate if supplied. If both are supplied then 'and' the filters to create a window. | |
| Jun 18, 2020 at 0:21 | comment | added | Steve Ngai |
Thanks for the code review. About the startDate and endDate, my idea is if both date are null, it will return all the result without filter without creating another method for method overloading. Maybe it is better to create another method overloading instead to simplify the code.
|
|
| Jun 17, 2020 at 22:54 | history | answered | forsvarir | CC BY-SA 4.0 |