PackageDescription: Fixtures
FixturesLast published: May 5, 2010 by 'ernest'
Defines 1 Classes
Extends 2 Classes
Fixtures is an abstract class for defining sets of objects for (integration) testing.
It allows a simple pattern in the creation of such objects and related ones.
Example:
CustomerFix is a subclass of Fixtures. It implements #create in which Customers are created.
The implementation of #delete should delete all Customer objects created.
OrderFix is a subclass of Fixtures. It implements both #create and #delete and uses Customer objects.
(these could be found in some database or accessing other storage).
In addition in implements #required which returns #(CustomerFix).
By evaluating "OrderFix create", Customer objects and then Order objects are created.
By evaluating "OrderFix delete", all those Order objects and then all those Customer objects are deleted.
2009, ernest.micklei @ philemonworks.com. MIT License