Closed ocoanet closed 5 years ago
Many thanks for this PR. While I think its purpose is self explanatory, could you please open an issue to describe the (expected) behaviour for your new check?
Is that ok with you if I keep the TimeSpan based overloads but then converts the TimeSpan to a Duration?
I just updated the PR:
Duration
field instead of TimeSpan.Duration.ToTimeSpan
was no longer necessary and was removed.Duration.FromTimeSpan
. It is not required, I can remove it or rename it if needed.I used TimeHelper.DiscoverUnit
and I was surprised to discover that the MinimumUnitAmount
is 2 instead of 1. In my view "1 Seconds" is easier to read than "1000 Milliseconds". I did not change this behavior though.
Tell me if anything needs to be corrected or if the changes need to be squashed.
Many thanks for these adjustments!
I used TimeHelper.DiscoverUnit and I was surprised to discover that the MinimumUnitAmount is 2 instead of 1. In my view "1 Seconds" is easier to read than "1000 Milliseconds". I did not change this behavior though.
Thanks, here is the rationale: duration are expressed in integer time units, hence the choice of 2 has a minimal value to avoid rounding 1499 ms to 2. Not a very strong case, so I am open to other views.
Just one last request: could you add a test case for Not, especially for when Not.IsCloseTo fails, to have an assertion on the test message? I am afraid I forgot to ask for it in my initial review.
I will update the contributing.md file to list the requested tests.
Just one last request: could you add a test case for Not, especially for when Not.IsCloseTo fails, to have an assertion on the test message?
Done.
Great additions!
Thanks for a great contribution.
Fixes #312.