A Self Test Method greatly enhances the testability of an object (or a society of objects) and can be used for, among other things:
Report on the state of an object
Report on the existence and state of dependency objects.
Traverse objects held by containership and trigger their Self Test Method s.
Classic question: How should a Self Test Method report its findings? The answer depends mostly on how best to package the diagnostics. The best way to communicate the results, in my opinion, is to delegate to an object that can be independently configured to echo to screen, and/or append to a TXT file, and/or output to the DebugOutWindow, and/or so on.
Contributors: Steven Black
( Topic last updated: 1999.07.06 04:37:31 AM )