
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
40 lines
798 B
Plaintext
40 lines
798 B
Plaintext
== Why is this an issue?
|
|
|
|
NUnit ``++TestFixture++``s may only have one ``++[SetUp]++`` method. Any more than that and the ``++TestFixture++`` will compile but not run.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,csharp]
|
|
----
|
|
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)
|
|
|
|
=== on 24 Nov 2015, 14:26:17 Ann Campbell wrote:
|
|
http://www.nunit.org/index.php?p=setup&r=2.2
|
|
|
|
=== on 24 Nov 2015, 15:13:36 Ann Campbell wrote:
|
|
FYI [~tamas.vajk] I'm closing this based on your comment on MMF-124
|
|
|
|
endif::env-github,rspecator-view[]
|