|Home||Back to Index|
Moq version 3.1 is out; I updated our tests from version 2.x this afternoon. The only breaking changes I encountered were that the Expect() and ExpectGet() methods were deprecated in favor of Setup() and SetupGet(), respectively. (Not technically breaking, but I had warnings-as-errors turned on.) A few quick search-and-replaces fixed this, and all the unit tests passed.
If you’re not familiar with Moq, it’s a library for creating mock objects (or stubs, or fakes - mocks in the broad sense) to assist with unit testing. Personally, I find it significantly easier and more intuitive than Rhino Mocks. Your mileage may vary, but Moq generally works the way I expect it to.