![]() Var stubbedSmsSender = MockRepository.GenerateStub() Var stubUserRepository = MockRepository.GenerateStub() Here is an example of verifying that when we execute the “forgot my password” scenario, we remembered to call the Save() method properly: public void When_user_forgot_password_should_save_user() Show me the codeĪs usual, the best way to explain what a library does is to look at the code using it. This functionality is very powerful, and it means that you can tell your fake objects, for each test, how to behave. Rhino Mocks will generate fake objects to replace the dependencies that you have, and then allow you to tell them, at runtime, how to behave. Its purpose is to ease testing by allowing the developer to create mock implementations of custom objects and verify the interactions using unit testing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |