Thanks for the replies; this all works great, except I'm still having issues with testing the abstract constructor itself. If the constructor on the abstract class throws an error, how do I test that with typemock?
In my particular case, I don't have a default (parameterless) constructor, and my abstract constructor may throw different exceptions based on the state of the constructor parameters. I want to test that those exceptions are thrown, but when I mock the abstract class, it seems to throw a System.Reflection.TargetInvocationException exception instead of the exception I was expecting to be thrown. Below is an example of what I'm doing; am I going about this the wrong way?
Thanks again for the help,
Darrell
[ExpectedException(typeof(ArgumentNullException), "Argument cannot be null.")]
public void ConstructorTestToVerifyExceptionIsThrown()
{
IAnInterface nullObject = null;
MockObject<AbstractClass> constructorMock = MockManager.MockObject<AbstractClass>(Constructor.NotMocked, nullObject);
Assert.Fail("Exception should have been thrown.", typeof(ArgumentNullException).Name, "Argument cannot be null.");
MockManager.Verify();
}