Skip to content

Commit

Permalink
Fixed IsNear testing method
Browse files Browse the repository at this point in the history
  • Loading branch information
jezzsantos committed Oct 25, 2024
1 parent d6a02ea commit 6f9b214
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UnitTesting.Common/OptionalExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace UnitTesting.Common;
public static class OptionalExtensions
{
public static AndConstraint<DateTimeAssertions> BeNear(this OptionalAssertions<DateTime> assertions,
DateTime nearbyTime, int precision = 850, string because = "", params object[] becauseArgs)
Optional<DateTime> nearbyTime, int precision = 850, string because = "", params object[] becauseArgs)
{
return new DateTimeAssertions(!assertions.Subject.HasValue
return new DateTimeAssertions(assertions.Subject.HasValue
? assertions.Subject.Value
: null)
.BeNear(nearbyTime, TimeSpan.FromMilliseconds(precision), because, becauseArgs);
Expand Down

0 comments on commit 6f9b214

Please sign in to comment.