January 2020
Intermediate to advanced
640 pages
16h 56m
English
As we mentioned in the previous sections, we will be building both an in-memory and a database-backed implementation of the Graph interface. To this end, we need to come up with a set of comprehensive tests to ensure that both implementations behave in exactly the same manner.
One way to achieve this is to write the tests for the first implementation and then duplicate them for each additional implementation that we may introduce in the future. However, this approach doesn't really scale well: what if we modify the Graph interface in the future? We would need to track down and update a whole bunch of tests that might be scattered across different packages.
A much better, and cleaner, ...