4 ms·
Yes, my bad for not clarify it: mock the repository part, but not to mock as an entire ActiveRecord. for example: FriendsRepository.java is an interface that
by edwinnathaniel 14y ago
Yes, my bad for not clarify it: mock the repository part, but not to mock as an entire ActiveRecord.
for example:
FriendsRepository.java is an interface that can be mocked during unit-test while the integration-test would use the actual implementation.
I know that the Java solution tend to be brittle because it somewhat forces people to have 1 interface, 1 class implementation (the mock implementation would be provided by mocking library).