rspec/rules/S3430/csharp/rule.adoc

33 lines
893 B
Plaintext
Raw Normal View History

== Why is this an issue?
In general, ``++async++`` ``++void++`` test methods are not executed by test frameworks, therefore it's better to avoid them altogether.
=== Noncompliant code example
2022-02-04 17:28:24 +01:00
[source,csharp]
----
[TestMethod]
public async void MyIgnoredTestMethod() // Noncompliant
{ /* ... */ }
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
=== duplicates: S3433
=== on 1 Dec 2015, 14:32:37 Tamas Vajk wrote:
\[~ann.campbell.2] I changed the description to not mention ``++[TestMethod]++`` attribute, because that is framework specific. In NUnit, xUnit, and MS test frameworks there are different attributes for marking test methods.
=== on 1 Dec 2015, 15:02:04 Ann Campbell wrote:
Thanks [~tamas.vajk]
=== on 31 Jul 2017, 16:07:05 Jean-Christophe Collet wrote:
Merged with RSPEC-3433
endif::env-github,rspecator-view[]