rspec/rules/S2187/csharp/how-nunit.adoc

34 lines
519 B
Plaintext
Raw Normal View History

2023-06-06 16:24:33 +02:00
:framework: NUnit
:classAnnotation: TestFixture
== How to fix it in NUnit
include::how.adoc[]
* `Test`
* `TestCase`
* `TestCaseSource`
* `Theory`
=== Code examples
==== Noncompliant code example
[source,csharp,diff-id=11,diff-type=noncompliant]
2023-06-06 16:24:33 +02:00
----
[TestFixture]
public class SomeClassTest { } // Noncompliant: no test
----
==== Compliant solution
[source,csharp,diff-id=11,diff-type=compliant]
2023-06-06 16:24:33 +02:00
----
[TestFixture]
public class SomeClassTest
{
[Test]
public void SomeMethodShouldReturnTrue() { }
}
----