tpierrain / NFluent

Smooth your .NET TDD experience with NFluent! NFluent is an ergonomic assertion library which aims to fluent your .NET TDD experience (based on simple Check.That() assertion statements). NFluent aims your tests to be fluent to write (with a super-duper-happy 'dot' auto-completion experience), fluent to read (i.e. as close as possible to plain English expression), but also fluent to troubleshoot, in a less-error-prone way comparing to the classical .NET test frameworks. NFluent is also directly inspired by the awesome Java FEST Fluent assertion/reflection library (http://fest.easytesting.org/)
Apache License 2.0
310 stars 53 forks source link

Checks for sub par use pattern #328

Open dupdob opened 4 years ago

dupdob commented 4 years ago

Some people tends to rely on a limited subset of checks and/or perform condition checks in test code, such as

Check.That( result == 5).IsTrue(); // instead of Check.That(result).IsEqualTo(5);

Check.That(result >= 0).IsTrue(); // instead of Check. That(result).IsPositiveOrZero();

Expected Behavior

NFluent should provide hints when it recognise an anti pattern.