Asserting a mock with test framework
Posted by: Mehfuzs WebLog,
on 09 Dec 2011 |
View original | Bookmarked: 0 time(s)
When asserting an expected call for its number of occurrences or may be just to verify if the setup/arrange is acted as intended, the tool generally raises assertion that points us to the reason why the test failed. Different mocking tools use different exception classes therefore there is no common way to consolidate them. However, if we just take a look into the test framework unless its some alien one, they all have a common underlying structure for Assert.Throws or ExpectedException (MSTest)....