rspec/rules/S3411/csharp/rule.adoc

31 lines
573 B
Plaintext
Raw Normal View History

NUnit ``++TestFixture++``s may only have one ``++[SetUp]++`` method. Any more than that and the ``++TestFixture++`` will compile but not run.
== Noncompliant Code Example
----
namespace NUnit.Tests
{
using System;
using NUnit.Framework;
[TestFixture]
public class MyTests
{
[SetUp] public void Init()
{ /* ... */ }
[Setup] public void Prep() // Noncompliant
{ /* ... */ }
}
}
----
ifdef::env-github,rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]