“Teaching by precept is a long road, but short and beneficial is the way by example.” (quote by Seneca the Younger)

Quite often developers will be consumers of arc42 concepts, and developers are highly interested in getting stuff done. They need to know HOW they can or should achieve their goals?

The most concrete way to answer such questions is… source code:

Show selected unit tests

Unit tests have their prerequisites (in the setup methods) and their assertions/consequences (in the assert statements) made explicit.

Automate inclusion of code artifacts

In the ideal case you include source code directly from your code repository, your version control system (like Git or Subversion). That ensures your arc42 documentation always contains current, tested and correct code.

If your tools don’t allow for automated inclusion, refer to relevant code instead of copy/pasting it. Be careful - the more specific your references are (i.e. to method names), the more likely to change.

Don’t copy/paste!

If everything fails - and you absolutely HAVE to copy/paste code, then restrict to the most fundamental or important parts. Don’t copy extensive code fragments manually into your documentation.