Ale, music and enjoying life.
A few weeks back I noticed that a part of the code that I’d been working on for over a year seemed to be growing in size and needed to be addressed in order to avoid future headaches and pain. The code is by…
Issue Using Moq I was creating a few unit tests and stumbled across an interesting problem. I needed to mock a call to an async method on a service under test that took in a 2 parameters and returned a tuple of 2 values….
The Scenario I have a loop in production code that has evolved into processing batches of records. I need to modify an existing unit test to accommodate mocking the same method call each time through the loop returning different results on each loop (as…
What follows is simply a few rough notes I made with experience with a Moq framework and converting to Rhino Mocks: Asserting a method call ISomethingRepository mockedSomethingRepository = MockRepository.GenerateMock(); var person = new Person { name = “Bob” }; // Act var something =…