This rule addresses the issue of incomplete assertions that can occur when using certain test frameworks. Incomplete assertions can lead to tests that do not effectively verify anything. The rule enforces the use of complete assertions in specific cases, namely:
`Fluent Assertions` provides an interface for writing assertions, and it is important to ensure that `Should()` is properly used in conjunction with an assertion method.
\[~tamas.vajk] see truncated description in main task.
=== on 24 Nov 2015, 14:27:15 Tamas Vajk wrote:
\[~ann.campbell.2] It seems okay.
Do we mark somehow rules that are library dependent? For example, out of the box we only have ``++Assert.IsTrue++`` and ``++Assert.AreEqual++``-like assertions. With those, this rule doesn't make sense. But when you add a library like "FluentAssertions", you could write "something.Should();" instead of "something.Should().NotBeNull()".
=== on 24 Nov 2015, 14:36:37 Ann Campbell wrote:
\[~tamas.vajk] should we expand the examples to include:
----
Assert; // Noncompliant
----
----
Assert.AreNotSame(actual,"");
----
? Does the noncompliant version compile?
=== on 24 Nov 2015, 14:49:24 Tamas Vajk wrote:
\[~ann.campbell.2] No, ``++Assert;++`` on its own doesn't compile.