C# – Strict Mocks using AAA syntax of Rhino Mocks

cnetrhino-mocksunit testing

Is it possible to create a "strict" mock using the new AAA syntax of Rhino Mocks? The issue I am seeing is that the library I am mocking often returns null as a valid return value (which I handle in my function), so using the default mock I can never be sure if I tested all paths or I forgot to set some expectations.

Best Answer

I Rhino Mocks 3.6 we finally have: MockRepository.GenerateStrictMock<T>(). GenerateMock does not create strict mocks.

Related Topic