Testing the composite template

Do you know the well-tested and open-source Composite examples in Smalltalk?

I would like to consider examples of the implementation of the Composite template in Smalltalk. Any dialect is fine, I'm interested in, in particular, the source code, including unit test cases. This post describes what I am looking for, common test fragments that can be reused in my applications.

A well-thought-out implementation is also useful because I want to know how compound tests are structured.

+5
source share
1 answer

A composite pattern is extremely common in Smalltalk, I suspect that almost any application with a reasonable size has one or more uses for this design pattern. Some of the packages that I know that contain a lot of tests include:

  • Refactoring Engine: A refactoring engine contains dozens of composites, most famous for the AST model. It comes with a good collection of tests and is available in almost all Smalltalk dialects.

  • Primorye: these web application models model 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: . , , . , .

+5

All Articles