Reputation: 5148
I keep getting :
The type or namespace name 'TestSuite' could not be found (are you missing a using directive or an assembly reference?)
I use visual studio 2010 and I have installed the latest NUnit and selenium references via NuGet. Here is the code:
using NUnit.Framework;
namespace SeleniumTests
{
public class ManifestTestSuite
{
[Suite]
public static TestSuite Suite
{
get
{
TestSuite suite = new TestSuite("MyTestSuite");
suite.Add(new AddAll());
suite.Add(new RemoveAll());
return suite;
}
}
}
}
Upvotes: 2
Views: 4481
Reputation: 139758
The TestSuite
class lives inside the nunit.core.dll
which is not distributed with the the nuget package because normally there is no need for it.
So you need to download the "full" nunit package from the the NUnit website and you can find the nunit.core.dll
in the lib folder inside the zip file.
However you don't need to this because there is a new approach since 2.4.4 as described in the documenation: you can return an array of the tests instead of an instance TestSuite
:
[Suite]
public static IEnumerable Suite
{
get
{
ArrayList suite = new ArrayList();
suite.Add(new AddAll());
suite.Add(new RemoveAll());
return suite;
}
}
Upvotes: 2