thomhurst / TUnit

A modern, fast and flexible .NET testing framework
MIT License
2.28k stars 37 forks source link

Please support FluentAssertions! #572

Closed alvipeo closed 2 weeks ago

alvipeo commented 1 month ago

You have a very pretty testing lib here. But PLEASE use FluentAssertions.

thomhurst commented 1 month ago

You can bring fluent assertions in yourself as a dependency if you need to. Any reason why you think you can't?

thomhurst commented 1 month ago

I have also raised a PR to map FA exceptions to TUnit assertions here: https://github.com/fluentassertions/fluentassertions/pull/2758

Xen0byte commented 1 month ago

You can bring fluent assertions in yourself as a dependency if you need to. Any reason why you think you can't?

Indeed, the assertion library can be completely independent from the test framework, and I should probably note that some people, myself included, do prefer TUnit.Assertions over FluentAssertions, and I do hope that they keep getting iterated on and not left on the backburner just because FluentAssertions exists.

I've said this on reddit and I'll say it here too, I really like how TUnit.Assertions start with Assert so that you can scan for them quickly in the code (as opposed to the Should in FluentAssertions which I highly dislike being so inconsistently located) but are also fluent, so TUnit.Assertions combines the best of both worlds that NUnit's constraint model and FluentAssertions bring.

thomhurst commented 2 weeks ago

My PR has been merged, so my work is done. Just have to wait for the 7.0 release I believe. So going to close this 😄

(https://github.com/fluentassertions/fluentassertions/pull/2758)