Yeah, there is an easier way:
test.AssertWasCalled(
t => t.CalculateBeta(
Arg<double>.Matches(a => Math.Abs(a - 50) < 0.01),
Arg<double>.Matches(b => Math.Abs(b - 3.74593228) < 0.000001)
)
);
Actually, you can pass any predicate to Arg<T>.Matches()
to validate each argument particulary.