Over Specification in Tests
Posted by: ISerializable,
on 12 Jul 2008 |
View original | Bookmarked: 0 time(s)
I've gotten the chance to visit and consult various companies and I see this all the time: Over specification in tests, especially when doing mocks and stubs. One main reason for that is that people use their stub as a mock object (stubs are fake objects that we will not assert on so that we can test something else). here is a small example from something posted on the alt.net mailing list: [Test] public void Can_Return_All_Plans() { IPlanDao mockPlanDao = MockRepository.GenerateMock<IPlanDao>();...