Closed souhailelk closed 2 years ago
@dennisdoomen What do you think of the implementation of IEquivalencyAssertionOptions
and the usages?
I'll adjust more the code after your review 😊
I don't get how you ended up with that implementation. What I was trying to convey in all the comments is something like:
actual.Should().BeEquivalentTo(expected, options => options
.Using<double>(d => d.Subject.Should().BeApproximately(d.Expectation, 0.1))
.WhenTypeIs<double>()));
Where options
is some kind of interface like IJsonAssertionOptions<T>
that (for now) only exposes the Using<T>
method in the example. This interface is implemented by a type that inherits from EquivalencyAssertionOptions
(from FluentAssertions).
I don't get how you ended up with that implementation. What I was trying to convey in all the comments is something like:
actual.Should().BeEquivalentTo(expected, options => options .Using<double>(d => d.Subject.Should().BeApproximately(d.Expectation, 0.1)) .WhenTypeIs<double>()));
Where
options
is some kind of interface likeIJsonAssertionOptions<T>
that (for now) only exposes theUsing<T>
method in the example. This interface is implemented by a type that inherits fromEquivalencyAssertionOptions
(from FluentAssertions).
@dennisdoomen, I tried to implement that in my recent commits. What do you think?
@dennisdoomen Thank you for the review. Please, when could you merge the P.R?
@dennisdoomen Thank you for the review.
Please, when could you merge the P.R?
When I've also reviewed it. I'll do it one of the following days.
@jnyrup could you review my P.R 😊 ?
@jnyrup Thanks for the review.
@dennisdoomen do you have any last minutes changes that needs to be done before merging?
Fixes #58