Releases: dogmatiq/testkit
Releases · dogmatiq/testkit
Version 0.20.0
- [BC] Bumped Dogma to v0.19.0.
Version 0.19.0
Version 0.18.1
Changed
- Use
enginekit/messageinstead ofconfigkit/message. - It is no longer possible to (mis-)use a single message type as both a pointer and a non-pointer. If a type implements
dogma.Command,dogma.Event, ordogma.Timeoutusing pointer receivers then a pointer type must be used; otherwise, a non-pointer type must be used.
Version 0.18.0
Added
- Added
Not()expectation, which negates a single expectation.Not()is functionally equivalent to usingNoneOf()with a single argument, but produces more intuitive test reports. - Added
CommandValidationScope(),EventValidationScope(), andTimeoutValidationScope()to help when testing message validation logic.
Version 0.17.2
Version 0.17.1
Fixed
- Fixed issue that caused an empty
SUGGESTIONSsection to be printed on test reports in some circumstances. ToExecuteCommandMatching(),ToOnlyExecuteCommandsMatching(),ToRecordEventMatching()andToOnlyRecordEventsMatching()now properly report impossible assertions when the predicate's argument type is not a recognized message.
Version 0.17.0
Added
- Added
ReportGenerationContextto hold information required when generating test reports. - Added
Test.Annotate()to add human-readable annotations to values within test reports.
Changed
- [BC] Changed
Predicate.Report()to accept aReportGenerationContextinstead of individual arguments.
Version 0.16.0
Changed
- Bumped Dogma to v0.14.0, which involved removing any calls to the
TimeoutHint()method on the handler interfaces, which has been removed. ToExecuteCommandMatching()andToRecordEventMatching()now accept predicate functions with a more specific argument type thandogma.Commandanddogma.Event, respectively. Any message that does not match the argument type of the predicate is ignored.ToOnlyExecuteCommandsMatching()andToOnlyRecordEventsMatching()now accept predicate functions with a more specific argument type thandogma.Commandanddogma.Event, respectively. Any message that does not match the argument type of the predicate is considered a failure.
Fixed
- Fixed poor wording of
ToOnlyExecuteCommandsMatching()andToOnlyRecordEventsMatching()failure reports when no messages were matched. - Fixed a few swapped references to
dogma.Commandanddogma.Eventwhich were aliases preior to Dogma v0.14.0.
Version 0.15.4
Added
- Added
ToExecuteCommandType[T]()andToRecordEventType[T]()expectations.
Deprecated
- Marked
ToExecuteCommandOfType()andToRecordEventOfType()as deprecated. These functions will be removed in a future release; use the new generic versions instead.
Version 0.15.3
Changed
- Use
dogma.Command,EventandTimeoutinterfaces instead ofdogma.Messagewhere appropriate.
Fixed
- Supress rendering of explanation and suggestions in test reports when a failed expectation is negated by
NoneOf()(thanks [@sameaste92]).