5 ms·
This is not a good example, because in this example, Mockito is used to mock a very simple class (DateTime), which should not be mocked at all. It is also used
by scubaguy 13y ago
This is not a good example, because in this example, Mockito is used to mock a very simple class (DateTime), which should not be mocked at all. It is also used to verify that the dependent object is called exactly twice, which may be unnecessary.
This is more of a problem where a library is not used well. Mockito is a very good library, this example really does it disservice.
- lennel 13y agoMockito easily leads to a false belief that code is tested. Mocking dependencies and simply asserting those mocks is useless yet I see that all the time.