tpierrain/NFluent

Add ...OrEqual comparisons for numerical types

dupdob opened this issue · 3 comments

Feature request:
As of now, the only explicitly available comparison for numerical types are IsStrictlyGreaterThan and IsStrictlyLessThan. If one needs <= or >= comparison, one can use IsBefore or IsAfter, but those are not intuitive

Expected Behavior

NFluent should provide IsGreaterOrEqualThan and IsLessOrEqualThan for clarity.

Indeed I was just looking for an IsGreaterOrEqualThan and IsLessOrEqualThan. Checking the code IsBefore or IsAfter is not actually the solution as both will fail on equality.

To be precise what I really need is IsInRange or IsBetween. Sure you can do that with an And but that's rather clunky.

Which leaves me with the question: When will Version 3.0.0 be delivered? I'm currently only seeing Version 2.7.2.

hello
thanks for pointing out the error regarding IsBefore and IsAfter.
V 3.0 is currently available in pre release (alpha status), which is production ready, with the following caveat:

  1. new features' API are not stable yet (signature may change)
  2. it is not feature complete yet
  3. it is as thoroughly tested as normal release (or beta for that matter)

you should open an issue asking for a new check (IsInRange or IsBetween) so we can discuss the finer details there.