Skip to content

Releases: dogmatiq/testkit

Version 0.13.4

22 Apr 05:34
Compare
Choose a tag to compare
Version 0.13.4 Pre-release
Pre-release

Changed

  • Hide unexported struct fields in message diffs

Version 0.13.3

22 Apr 01:36
Compare
Choose a tag to compare
Version 0.13.3 Pre-release
Pre-release

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

16 Apr 01:21
Compare
Choose a tag to compare
Version 0.13.2 Pre-release
Pre-release

Added

  • Add ToOnlyExecuteCommandsMatching() and ToOnlyRecordEventsMatching() expectations

Version 0.13.1

13 Apr 01:05
Compare
Choose a tag to compare
Version 0.13.1 Pre-release
Pre-release

Added

  • Add ToExecuteCommandMatching() and ToRecordEventMatching() expectations
  • Add ToRepeatedly() expectation

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()