What problem does it solve?
Provide clear patterns and conventions for writing deterministic, maintainable xUnit-style unit tests in TestBox so developers can validate CFC services, models, and utilities in isolation without fragile setup or inconsistent assertions.
Core Features & Use Cases
- Lifecycle guidance for global and per-test setup and teardown using beforeTests, afterTests, setup, and teardown to manage shared resources and ensure test isolation.
- Assertion and matcher usage with the $assert API and BoxLang dynamic assertion helpers, plus mixing fluent expect() matchers when desired.
- Mocking and Arrange-Act-Assert examples for unit-testing service logic, verifying interactions, skipping conditional tests, and registering custom reusable assertions.
Quick Start
Create an xUnit TestBox spec that uses beforeTests to initialize shared fixtures, setup/teardown to prepare per-test state, and testXxx functions that assert behavior with $assert.