Skip to content

Releases: dogmatiq/testkit

Version 0.13.0

01 Mar 02:11
Compare
Choose a tag to compare
Version 0.13.0 Pre-release
Pre-release

Changed

  • [BC] Updated to Dogma to v0.11.0

Version 0.12.0

20 Dec 04:43
Compare
Choose a tag to compare
Version 0.12.0 Pre-release
Pre-release

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 to PredicateScope
  • [BC] Added Action.Location() method

Changed

  • [BC] Renamed Action.Apply() to Do()
  • Test.Expect() now returns the Test, allowing chained calls

Removed

  • [BC] Removed the PredicateOptions parameter from Expectation.Predicate()

Version 0.11.0

27 Nov 03:14
Compare
Choose a tag to compare
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() and BeginContext() functions, used to start a new Test
  • Add ExecuteCommand(), RecordEvent(), AdvanceTime() and Call() functions
  • Add Expect() method to Test
  • Add EnableHandlers() and DisableHandlers() methods to Test
  • Add TimeAdjuster interface, for use with AdvanceTime()
  • Add Action and ActionScope types
  • Add Expectation, Predicate, PredicateScope and PredicateOptions types
  • [BC] Add Failed(), Fatal() and Helper() to the TestingT interface

Changed

  • [BC] Test.Prepare() now accepts ...Action (previously ...dogma.Message)
  • [BC] The function passed to Call() no longer returns an error
  • [BC] Rename WithStartTime() to StartTimeAt()
  • [BC] Rename WithOperationOptions() to WithUnsafeOperationOptions()
  • [BC] Move assert.AllOf(), AnyOf() and NoneOf() to the testkit package
  • [BC] Move assert.Should(), to testkit.ToSatisfy()
  • [BC] Move assert.CommandExecuted(), to testkit.ToExecuteCommand()
  • [BC] Move assert.CommandTypeExecuted(), to testkit.ToExecuteCommandOfType()
  • [BC] Move assert.EventExecuted(), to testkit.ToRecordEvent()
  • [BC] Move assert.EventTypeExecuted(), to testkit.ToRecordEventOfType()

Removed

  • [BC] Remove the Runner type and New() which constructed it
  • [BC] Remove ExecuteCommand(), RecordEvent(), AdvanceTime() and Call() methods from Test
  • [BC] Remove TimeAdvancer function (replaced with TimeAdjustment 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() and MustNew() now require a configkit.RichApplication
  • [BC] Moved the engine/fact package to fact
  • [BC] Moved the engine/envelope package to envelope

Removed

  • [BC] Remove the engine/controller package

Fixed

  • Engine.Tick() now properly ignores disabled handlers

Version 0.10.0

15 Nov 22:52
Compare
Choose a tag to compare
Version 0.10.0 Pre-release
Pre-release

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

05 Nov 21:05
Compare
Choose a tag to compare
Version 0.9.0 Pre-release
Pre-release

Changed

  • [BC] Updated to Dogma to v0.9.0

Version 0.8.1

04 Nov 02:11
Compare
Choose a tag to compare
Version 0.8.1 Pre-release
Pre-release

Added

  • Add engine.MustNew()

Version 0.8.0

03 Nov 05:00
Compare
Choose a tag to compare
Version 0.8.0 Pre-release
Pre-release

Changed

  • [BC] Remove aggregate Create() and Exists() methods (complies with Dogma v0.8.0)

Version 0.7.0

02 Nov 01:21
Compare
Choose a tag to compare
Version 0.7.0 Pre-release
Pre-release

Added

  • Add Test.AdvanceTime(), ByDuration() and ToTime()
  • Add Test.Call()
  • Add assert.Nothing
  • Add engine.CommandExecutor
  • Add engine.EventRecorder
  • [BC] Add op parameter to assert.Assertion.Begin()

Removed

  • [BC] Remove Test.AdvanceTimeTo() and AdvanceTimeBy()
  • [BC] Remove verbose parameter assert.Assertion.BuildReport()
  • [BC] Remove RunnerVerbose() and Verbose() options
  • [BC] Remove Engine.ExecuteCommand() and RecordEvent()

Changed

  • The -v (verbose) option to go test no longer affects testkit's behavior, full logs are always rendered

Version 0.6.2

19 Oct 01:38
Compare
Choose a tag to compare
Version 0.6.2 Pre-release
Pre-release

Changed

  • Test.AdvanceTimeBy() and AdvanceTimeTo() can now be called without making any assertions by passing a nil assertion

Version 0.6.1

19 Oct 00:35
Compare
Choose a tag to compare
Version 0.6.1 Pre-release
Pre-release

Added

  • Add Exists() and HasBegun() methods to aggregate & process scopes