This question is locked. New answers and comments are not allowed.
I’ve also been using Rhino Mocks to avoid dependencies and focus on unit testing domain classes. Unfortunately, I’m a bit stuck when it comes to stubbing a [Persistent] class.
For example, if you had:
[Persistent] |
public abstract class Person |
{ |
… |
} |
Because it is abstract, it would be nice to call:
MockRepository.GenerateStub<Person>() |
but I always get a null reference exception relating to
Telerik.OpenAccess.PersistentAttribute.get_IdentityClassName() |
Any thoughts?
(A work-around is to create a derived class without the [Persistent]
property and stub that, but I don’t want to do that for every domain
class!)
Pete.