Cyclium.Test.FakeOutputAdapter (Cyclium v0.1.12)

Copy Markdown View Source

In-memory fake output adapter for testing. Records deliveries and returns configurable responses.

Usage

setup do
  {:ok, _} = Cyclium.Test.FakeOutputAdapter.start_link()
  :ok
end

Summary

Functions

Returns a specification to start this module under a supervisor.

Return all recorded deliveries as [{type, payload, ctx}].

Reset deliveries and response.

Set deliver to return an error.

Set the response returned by deliver/3.

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

deliveries()

Return all recorded deliveries as [{type, payload, ctx}].

reset()

Reset deliveries and response.

set_error(reason)

Set deliver to return an error.

set_response(response)

Set the response returned by deliver/3.

start_link(opts \\ [])