Mock dll methods for unit tests

Posted by sanjeev40084 on Stack Overflow See other posts from Stack Overflow or by sanjeev40084
Published on 2010-04-15T19:19:26Z Indexed on 2010/04/15 19:23 UTC
Read the original article Hit count: 274

Filed under:
|
|
|

I am trying to write a unit test for a method, which has a call to method from dll. Is there anyway i can mock the dll methods so that i can unit test?

public string GetName(dllobject, int id)
{
     var eligibileEmp = dllobject.GetEligibleEmp(id); <---------trying to mock 
                                                                 this method

     if(eligibleEmp.Equals(empValue)
     {
      ..........
     }
}

© Stack Overflow or respective owner

Related posts about mocking

Related posts about rhino-mocks