Do you know well-tested and open source Composite examples in Smalltalk?
I would like to review example implementations of the Composite pattern in Smalltalk. Any dialect is fine, I am interested particularly in source code including unit test cases. This post describes what I am looking for, common testing snippets which can be re-used in my applications.
An well-designed implementation is useful too because I want to learn how composite tests are structured.
The composite pattern is extremely common in Smalltalk, I suspect almost any reasonably sized application has one or more uses of this design pattern. Some of the packages I know that contain a lot of tests include:
Refactoring engine: The refactoring engine contains dozens of composites, most prominent the model of the AST. It comes with a good collection of tests and is available in almost all Smalltalk dialects.
Seaside: This web application framework models request handlers, widgets, html tags, configurations, ... as composite objects. Again, it comes with a good collection of tests and is available on many Smalltalk platforms.
Pier: This content management system has various composites to model nested pages and their content. There are hundreds of tests that validate the construction, destruction and behaviour of these composite structures. The tests are structured across the hierarchy of the classes and many tests are reused on different kind of nodes.