Sebastien Lachance

Setting expectations on properties with Rhino Mocks

For the getter, it’s exactly as you would do with a method :

 

Expect.Call(mockedConnection.CompanyConnectionString).Return("testconnectionstring");

For the setter, only assign the value you want to the property of the mocked object :

 

mockedConnection.ConnectionString = "testconnectionstring";</PRE



 

Comments