Cased.TestHelper (cased v1.0.0)

Provides helper functions for testing Cased features.

Link to this section Summary

Functions

Asserts that one or more Cased events were published to publisher when evaluating fun.

Asserts that a specific count of Cased events were published to publisher when evaluating fun.

Asserts that no Cased events were published to publisher when evaluating fun.

Captures Cased events published to publisher when evaluating fun.

Link to this section Functions

Link to this function

assert_publishes_cased_events(publisher, fun)

Specs

assert_publishes_cased_events(publisher :: atom() | pid(), fun :: function()) ::
  any()

Asserts that one or more Cased events were published to publisher when evaluating fun.

Link to this function

assert_publishes_cased_events(publisher, count, fun)

Specs

assert_publishes_cased_events(
  publisher :: atom() | pid(),
  count :: non_neg_integer(),
  fun :: function()
) :: any()

Asserts that a specific count of Cased events were published to publisher when evaluating fun.

Link to this function

assert_publishes_no_cased_events(publisher, fun)

Specs

assert_publishes_no_cased_events(publisher :: atom() | pid(), fun :: function()) ::
  any()

Asserts that no Cased events were published to publisher when evaluating fun.

Link to this function

capture_cased_events(publisher, fun)

Specs

capture_cased_events(publisher :: atom() | pid(), fun :: function()) :: [map()]

Captures Cased events published to publisher when evaluating fun.