testing
Links
- Don't enforce invocation order (Freeman/Pryce p 280). (Does EasyMock allow this?)
- Martin Fowler: Mocks aren't Stubs
- stackoverflow: Value of mock objects and high level unit tests
- Don't mock types that you can't change (or that can
change under you) – e.g. for third party stuff.
- Hard to know if mock behavior is correct. Behavior
might change in newer version of library.
- Write an adapter layer instead and mock that.
- (Freeman/Pryce - p69)
- Use
expect(mock.callmethod(isA(String))
instead of expect(mock.callmethod(“foo&bar”))