The Trunk: SUnit-pre.123.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: SUnit-pre.123.mcz

commits-2
Patrick Rein uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-pre.123.mcz

==================== Summary ====================

Name: SUnit-pre.123
Author: pre
Time: 26 October 2020, 5:12:17.449595 pm
UUID: 105fdee7-2395-6043-bb05-19c732d23ef0
Ancestors: SUnit-pre.122

Adds long overdue class comment to the TestResource class on how to create and use TestResources.

=============== Diff against SUnit-pre.122 ===============

Item was changed:
  Object subclass: #TestResource
  instanceVariableNames: 'name description'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'SUnit-Kernel'!
  TestResource class
  instanceVariableNames: 'current'!
+
+ !TestResource commentStamp: 'pre 10/26/2020 17:11' prior: 0!
+ A TestResource represents a resource required for tests that is time consuming / difficult to setup AND does not break test isolation, i.e. it can be reused across tests within one suite.
+
+ To define your own test resource, subclass from TestResource. The most important method to implement is #setUp, where you can define how the test resource is to be initialized. You can store arbitrary state here. Analogously, you can release relevant state in the #tearDown method.
+
+ If you want to have a test resource available for a suite, implement the method #resources on the class side of your TestCase subclass. You can then access your resource by calling #current on your TestResource subclass.!
  TestResource class
  instanceVariableNames: 'current'!