Integration testing
Build the database through the app. Copy it for tests.
We do not fill the database with hand-written fake rows. We run simulated users, actions, jobs, and mocked time through the same Facade methods the application uses. That creates a baseline database the system itself produced. Each test gets a fresh copy of that baseline, runs one action, checks the result, and deletes the copy.
Seed through → Facade
DTO filled with seed data
The seed does not bypass the system. It enters through the Facade, so the baseline is created by application code instead of hand-written rows. Broken rules surface while the baseline is being built.
Simulate useful states
- Day 1
- Day 7
- Day 22
- Day 45
- User A·onboarded
- User B·first trade
- User C·failed payment
- User D·mid-flow
- User E·edge case
The generator advances time and runs normal flows until useful testing states exist. Then the database is frozen as one reusable baseline.
Copy, test, delete
Each test starts from a clean copy of the baseline. It restores one named state, runs one action through the Facade, checks the database or DTO result, then throws the copy away.