Has anyone got a strategy for testing a gearchy in Resharper?
I usually use the TestDriven.Net and Resharper tests, with NUnit tests. TestDriven is awesome for everything, but quickly finds a bad test from a batch run (which can be thousands), which includes the Resharper runner.
I usually use a template with an abstract base class (like the code below) for test cases overridden to get the right subclass that works fine in TestDriven, but Resharper just ignores them! I thought that with v5.0 Resharper used the NUnit code base, which means that this should work, but it is not.
Cheers,
Berryl
[TestFixture]
public class AdminAccountTests : AccountTests
{
protected override Account _GetAccount() { return new AdminAccount(_idScheme, _description); }
}
[TestFixture]
public class LeaveTimeAccountTests : AccountTests
{
protected override Account _GetAccount() { return new LeaveTimeAccount(_idScheme, _description); }
}
public abstract class AccountTests
{
protected abstract Account _GetAccount();
[SetUp]
public void SetUp()
{
_account = _GetAccount();
}
[Test]
public void OnCreation_Blah() {
Assert.That(_account.IdScheme, Is.EqualTo(_idScheme));
}
}