Current section

Files

Jump to
commanded test aggregates support append_items_handler.ex
Raw

test/aggregates/support/append_items_handler.ex

defmodule Commanded.Aggregates.AppendItemsHandler do
@moduledoc false
@behaviour Commanded.Commands.Handler
alias Commanded.Aggregates.ExampleAggregate
alias Commanded.Aggregates.ExampleAggregate.Commands.AppendItems
def handle(%ExampleAggregate{} = aggregate, %AppendItems{count: count}) do
ExampleAggregate.append_items(aggregate, count)
end
end