Unit testing: Difference between revisions

Content added Content deleted
Line 92: Line 92:
Tests are subclasses of TestCase, and define test methods. Execution and visual presentation can be within the class browser or a UnitTest runner (which are part of the system), but tests can also be executed "headless" (i.e. without UI).
Tests are subclasses of TestCase, and define test methods. Execution and visual presentation can be within the class browser or a UnitTest runner (which are part of the system), but tests can also be executed "headless" (i.e. without UI).


Obviously, this is defined in the class library, because in Smalltalk everything comes from the class library (there is no distinction between "internal" and "external" in Smalltalk)
Obviously, this is defined in the class library, because in Smalltalk everything comes from the class library (there is no distinction between "internal" and "external")
Typical test cases look like:
Typical test cases look like: