December 2018
Intermediate to advanced
414 pages
10h 19m
English
The composite pattern helps in writing proper abstractions when dealing with objects that appear in hierarchies; being containers and containees. For example, on a filesystem, a directory can contain files and other directories. In this case, the composite pattern would be a suitable abstraction. Each element of the filesystem can be either a container for other elements (a directory), or a terminal node (file).
In this section, we will see how to set up and implement the composite pattern to represent a series of unit tests organized in test suites.
Read now
Unlock full access