Expand description
This module provides a test framework for building a resilient test base around aggregates.
A TestFramework
should be used to build a comprehensive set of aggregate tests to verify
your application logic.
type CustomerTestFramework = TestFramework<Customer>;
CustomerTestFramework::with(CustomerService::default())
.given_no_previous_events()
.when(CustomerCommand::AddCustomerName{
name: "John Doe".to_string()
})
.then_expect_events(vec![
CustomerEvent::NameAdded{
name: "John Doe".to_string()
}]);
Structs§
- Validation object for the
TestFramework
package. - Holds the initial event state of an aggregate and accepts a command.
- A framework for rigorously testing the aggregate logic, one of the most important parts of any DDD system.