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: ** Comment from web user: mikeFourie **
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: ** Comment from web user: mikeFourie **
thats odd... let me try put together a repro...