Home > Software design >  FluentAssertions to check number of characters after decimal point
FluentAssertions to check number of characters after decimal point

Time:09-16

Using FluentAssertions, is there any nice way to confirm the number of characters after a decimal point? I've been looking for the best way to do this but can't find much on it.

CodePudding user response:

Or use Should().MatchRegex() on the string representation.

CodePudding user response:

I believe you should use Should().BeApproximately(args) or Should.BeInRange(args)

  • Related