Version 0.11.0
Pre-release
Pre-release
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