Releases: dogmatiq/testkit
Releases · dogmatiq/testkit
Version 0.13.4
Changed
- Hide unexported struct fields in message diffs
Version 0.13.3
Added
- Add
WithMessageComparator()
for specifying custom message comparison behavior within a test - Add
DefaultMessageComparator()
, the default comparator, with support for protocol buffers messages
Version 0.13.2
Added
- Add
ToOnlyExecuteCommandsMatching()
andToOnlyRecordEventsMatching()
expectations
Version 0.13.1
Added
- Add
ToExecuteCommandMatching()
andToRecordEventMatching()
expectations - Add
ToRepeatedly()
expectation
Version 0.13.0
Changed
- [BC] Updated to Dogma to v0.11.0
Version 0.12.0
This release includes several changes to the underlying action and expectation
systems, some of which are not backwards compatable. Tests written using v0.11.0
should continue to work without modification.
Added
- [BC] Added
PredicateOptions
toPredicateScope
- [BC] Added
Action.Location()
method
Changed
- [BC] Renamed
Action.Apply()
toDo()
Test.Expect()
now returns theTest
, allowing chained calls
Removed
- [BC] Removed the
PredicateOptions
parameter fromExpectation.Predicate()
Version 0.11.0
This release includes extensive changes to the testing API. It formalizes the concepts of "actions" and "expectations" with the goal of a more consistent API and a greater level of extensibility.
Despite the large number of backwards incompatible changes it is relatively simple to migrate existing tests to the new API. Please see the v0.11.0 migration guide for detailed instructions.
Testing API
Added
- Add
Begin()
andBeginContext()
functions, used to start a newTest
- Add
ExecuteCommand()
,RecordEvent()
,AdvanceTime()
andCall()
functions - Add
Expect()
method toTest
- Add
EnableHandlers()
andDisableHandlers()
methods toTest
- Add
TimeAdjuster
interface, for use withAdvanceTime()
- Add
Action
andActionScope
types - Add
Expectation
,Predicate
,PredicateScope
andPredicateOptions
types - [BC] Add
Failed()
,Fatal()
andHelper()
to theTestingT
interface
Changed
- [BC]
Test.Prepare()
now accepts...Action
(previously...dogma.Message
) - [BC] The function passed to
Call()
no longer returns anerror
- [BC] Rename
WithStartTime()
toStartTimeAt()
- [BC] Rename
WithOperationOptions()
toWithUnsafeOperationOptions()
- [BC] Move
assert.AllOf()
,AnyOf()
andNoneOf()
to thetestkit
package - [BC] Move
assert.Should()
, totestkit.ToSatisfy()
- [BC] Move
assert.CommandExecuted()
, totestkit.ToExecuteCommand()
- [BC] Move
assert.CommandTypeExecuted()
, totestkit.ToExecuteCommandOfType()
- [BC] Move
assert.EventExecuted()
, totestkit.ToRecordEvent()
- [BC] Move
assert.EventTypeExecuted()
, totestkit.ToRecordEventOfType()
Removed
- [BC] Remove the
Runner
type andNew()
which constructed it - [BC] Remove
ExecuteCommand()
,RecordEvent()
,AdvanceTime()
andCall()
methods fromTest
- [BC] Remove
TimeAdvancer
function (replaced withTimeAdjustment
interface) - [BC] Remove
WithEngineOptions()
- [BC] Remove the
assert
package - [BC] Remove the
compare
package - [BC] Remove the
render
package
Engine
Added
- Add
EnableHandler()
operation option
Changed
- [BC]
engine.New()
andMustNew()
now require aconfigkit.RichApplication
- [BC] Moved the
engine/fact
package tofact
- [BC] Moved the
engine/envelope
package toenvelope
Removed
- [BC] Remove the
engine/controller
package
Fixed
Engine.Tick()
now properly ignores disabled handlers
Version 0.10.0
Changed
- [BC] Updated to Dogma to v0.10.0
Added
- Add support for projection compaction
Fixed
- Fix issue where engine operation options were not taking precedence over test options
Version 0.9.0
Changed
- [BC] Updated to Dogma to v0.9.0
Version 0.8.1
Added
- Add
engine.MustNew()