2014-09-30 3 views
0

이 방법의 단위 테스트를 쓰고 있습니다. Rhino Mock을 사용하고 있습니다. msdn 문서 에서처럼 테스트 케이스를 작성하려면 어떻게해야합니까?Rihno-mocks 단위 테스팅

mockSet.Verify(m => m.Add(It.IsAny<Blog>()), Times.Once()); // Looking for Equivalent in Rihno Mocks 

public class Person 
{ 
    public string FirstName {get;set;} 
    public string LastName {get;set;} 
} 

public Person Create(Person entity) 
{ 
    GetDbSet().Add(entity); 
    SaveChanges(); 
    return entity; 
} 

답변

1
var mocks = new MockRepository(); 
_context = mocks.DynamicMock<ApplicationDbContext>();