From 3dd93f1f837798c32100231240e2e00eca8f4f38 Mon Sep 17 00:00:00 2001 From: James Harris Date: Wed, 25 Sep 2024 09:05:22 +1000 Subject: [PATCH] Fix argument type. --- CHANGELOG.md | 7 +++++++ expectation.message.go | 2 +- expectation.messagetype.go | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90ead648..db196528 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ The format is based on [Keep a Changelog], and this project adheres to [keep a changelog]: https://keepachangelog.com/en/1.0.0/ [semantic versioning]: https://semver.org/spec/v2.0.0.html +## [0.17.2] - 2024-09-25 + +### Fixed + +- Fix argument type of `ToRecordEvent()` and `ToRecordEventOfType()`. + ## [0.17.1] - 2024-09-25 ### Fixed @@ -465,6 +471,7 @@ guide][0.11.0 migration guide] for detailed instructions. [0.16.0]: https://github.com/dogmatiq/testkit/releases/tag/v0.16.0 [0.17.0]: https://github.com/dogmatiq/testkit/releases/tag/v0.17.0 [0.17.1]: https://github.com/dogmatiq/testkit/releases/tag/v0.17.1 +[0.17.2]: https://github.com/dogmatiq/testkit/releases/tag/v0.17.2 diff --git a/expectation.message.go b/expectation.message.go index f0b4d50b..dde81dfd 100644 --- a/expectation.message.go +++ b/expectation.message.go @@ -35,7 +35,7 @@ func ToExecuteCommand(m dogma.Command) Expectation { // ToRecordEvent returns an expectation that passes if an event is recorded that // is equal to m. -func ToRecordEvent(m dogma.Command) Expectation { +func ToRecordEvent(m dogma.Event) Expectation { if m == nil { panic("ToRecordEvent(): message must not be nil") } diff --git a/expectation.messagetype.go b/expectation.messagetype.go index 89227df9..60306aa8 100644 --- a/expectation.messagetype.go +++ b/expectation.messagetype.go @@ -47,7 +47,7 @@ func ToRecordEventType[T dogma.Event]() Expectation { // same type as m is recorded. // // Deprecated: Use [ToRecordEventType] instead. -func ToRecordEventOfType(m dogma.Command) Expectation { +func ToRecordEventOfType(m dogma.Event) Expectation { if m == nil { panic("ToRecordEventOfType(): message must not be nil") }