Quantcast
Channel: MSBuild Extension Pack
Viewing all articles
Browse latest Browse all 1211

Closed Issue: Nunit 2.6.2 Suite running twice instead of once [11402]

$
0
0
using System;
using System.Collections;
using NUnit.Framework;

namespace Tests.MyTest
{
public class SpikeSuite
{
[Suite]
public static IEnumerable Suite
{
get
{
var suite = new ArrayList
{
new SpikeTest(),
};
return suite;
}
}
}

[TestFixture]
public class SpikeTest
{
[SetUp]
public void Setup()
{
Console.WriteLine("Test setup");
}

[TestFixtureSetUp]
public void FixtureSetup()
{
Console.WriteLine("Test fixture setup");
}

[Test]
public void TestMethod()
{
Console.WriteLine("Test method");
}
}

When I run the above mentioned fixture the output I get is:

Test fixture setup

.Test setup

Test method

Test fixture setup

.Test setup

Test method

How is it that the test setup, fixture setup and test method being executed twice?
Comments: no repro. I get

C:\Program Files (x86)\NUnit 2.6.2\bin\nunit-console.exe /nologo d:\a\Project
1.nunit
ProcessModel: Default DomainUsage: Default
Execution Runtime: net-3.5
Test fixture setup
.Test setup
Test method

Tests run: 1, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0.058 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0

Viewing all articles
Browse latest Browse all 1211

Trending Articles