Based on ideas from the .NET Autofixture. Requires Delphi Mocks to be installed
uses DUnitX for unit testing.
There are 3 basic things needed for unit tests in delphi.
- A unit testing framework, like DUnitX (Included in Delphi and is recommended)
- A way to mock classes, which can be done with a mocking framework like Delphi Mocks or Spring4d
- A way to generate test data, which can be done easily using AutoFixture.
AutoFixture is created to be an easy way to generate test data.
At a peek AutoFixtures has the following features
- Creates objects and initialize them with dummy data for test purposes
- Can initialize entire object hierarchies
- Highly configurable - how much data do you want, and how should it be initialized
- Integrates with mocking, and provides easy creation, setup and injection of mocks
The following features are not ready, but work is in progress
- Handling of multiple mocks of the same type - currently only one mock object of each class can be active.
- Easy setup of multiple mock objects at once.