Skip to content

Commit

Permalink
Merge pull request #189 from dogmatiq/127-message-expectation
Browse files Browse the repository at this point in the history
Change "message assertions" to be "expectations".
  • Loading branch information
jmalloc authored Nov 25, 2020
2 parents ba50231 + 02c1418 commit ac6c3ce
Show file tree
Hide file tree
Showing 28 changed files with 1,479 additions and 1,455 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ migrate tests from prior versions.
- **[BC]** Move `assert.Should()`, to `testkit.ToSatisfy()`
- **[BC]** Move `assert.CommandTypeExecuted()`, to `testkit.ToExecuteCommandOfType()`
- **[BC]** Move `assert.EventTypeExecuted()`, to `testkit.ToRecordEventOfType()`
- **[BC]** Move `assert.CommandExecuted()`, to `testkit.ToExecuteCommand()`
- **[BC]** Move `assert.EventExecuted()`, to `testkit.ToRecordEvent()`

### Removed

Expand Down
5 changes: 2 additions & 3 deletions action.call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/dogmatiq/dogma"
. "github.com/dogmatiq/dogma/fixtures"
. "github.com/dogmatiq/testkit"
"github.com/dogmatiq/testkit/assert"
"github.com/dogmatiq/testkit/engine"
"github.com/dogmatiq/testkit/engine/envelope"
"github.com/dogmatiq/testkit/engine/fact"
Expand Down Expand Up @@ -154,7 +153,7 @@ var _ = Describe("func Call()", func() {
MessageC1,
)
}),
assert.CommandExecuted(MessageC1),
ToExecuteCommand(MessageC1),
)
})

Expand All @@ -168,7 +167,7 @@ var _ = Describe("func Call()", func() {
MessageE1,
)
}),
assert.EventRecorded(MessageE1),
ToRecordEvent(MessageE1),
)
})

Expand Down
3 changes: 1 addition & 2 deletions action.dispatch.command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/dogmatiq/dogma"
. "github.com/dogmatiq/dogma/fixtures"
. "github.com/dogmatiq/testkit"
"github.com/dogmatiq/testkit/assert"
"github.com/dogmatiq/testkit/engine"
"github.com/dogmatiq/testkit/engine/envelope"
"github.com/dogmatiq/testkit/engine/fact"
Expand Down Expand Up @@ -119,7 +118,7 @@ var _ = Describe("func ExecuteCommand()", func() {

test.Expect(
ExecuteCommand(MessageC1),
assert.CommandExecuted(MessageC1),
ToExecuteCommand(MessageC1),
)

Expect(t.Failed()).To(BeTrue())
Expand Down
3 changes: 1 addition & 2 deletions action.dispatch.event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/dogmatiq/dogma"
. "github.com/dogmatiq/dogma/fixtures"
. "github.com/dogmatiq/testkit"
"github.com/dogmatiq/testkit/assert"
"github.com/dogmatiq/testkit/engine"
"github.com/dogmatiq/testkit/engine/envelope"
"github.com/dogmatiq/testkit/engine/fact"
Expand Down Expand Up @@ -121,7 +120,7 @@ var _ = Describe("func RecordEvent()", func() {

test.Expect(
RecordEvent(MessageE1),
assert.EventRecorded(MessageE1),
ToRecordEvent(MessageE1),
)

Expect(t.Failed()).To(BeTrue())
Expand Down
49 changes: 0 additions & 49 deletions assert/assertion.go

This file was deleted.

137 changes: 0 additions & 137 deletions assert/common_test.go

This file was deleted.

2 changes: 0 additions & 2 deletions assert/doc.go

This file was deleted.

15 changes: 0 additions & 15 deletions assert/ginkgo_test.go

This file was deleted.

Loading

0 comments on commit ac6c3ce

Please sign in to comment.