나는이 일을 전혀 할 수 없습니다. 내 시험에서이 코드를 가지고 :Rhino 모의로 IDbSet을 모의하는 방법
MockRepository repository = new MockRepository();
IDbSet<SystemUser> userSet = repository.StrictMock<IDbSet<SystemUser>>();
Expect.Call(userSet.Any(u => u.Id == "UserName")).Return(true);
// More code follows
그러나 폭탄을 오류가있는 StrictMock
라인 :
System.TypeLoadException: Method 'Create' on type 'IDbSet`1Proxy1862178487664986a7bd03ad3b5c6f2c' from assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a621a9e7e5c32e69' tried to implicitly implement an interface method with weaker type parameter constraints
어떤 아이디어이 될 수 있는지?
감사합니다.
아, 그건 이상적이지 않습니다 ... 어쨌든 나 자신의 수동 모의를 만들었습니다. 도와 주셔서 감사합니다! –