Extend Commanded package. A swiss army knife for applications following Domain-Driven Design (DDD), Event Sourcing (ES), and Command and Query Responsibility Segregation (CQRS).

What is next?

Check the following modules, if you are familiar with DDD, ES, and CQRS they should be familiar to you.


We publish some ExUnit.CaseTemplate as part of the package, we don't have that code to be compiled to production, or maintain a different package we must do some workaround the limitations problems, for now.

The test files are under test/test_support/command_handler_case.ex, since the modules is not under lib directory, Elixir will not load this module without importing the file manually:

In your test_helper.exs, add the following code-snippet:

one_piece_commanded_path = Mix.Project.deps_paths()[:one_piece_commanded]
Code.require_file "#{one_piece_commanded_path}/test/test_support/command_handler_case.ex", __DIR__

# ...

  • OnePiece.Commanded.TestSupport.CommandHandlerCase: helps with test cases for testing aggregate states, and command handlers.