3 ms·
That's what I hate about JMock, lol. You had better mock everything, and better put them in the exact order they will occur in, or your test fails. Most JMock
by mabbo 11y ago
That's what I hate about JMock, lol.
You had better mock everything, and better put them in the exact order they will occur in, or your test fails.
Most JMock unit tests I see are essentially the exact same code as is being tested, written a second time in the unit test. So if I want to refactor or modify this code in any way, my unit tests break- even if functionally, my tests are doing exactly what their spec says.
With Mockito, I can say 'Hey, if anyone calls this method with parameters sort of like this, give them this response', and then focus on my unit tests actually testing the output for a given input.