32 lines
577 B
Plaintext
32 lines
577 B
Plaintext
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[]
|