Edument CQRS and Intentful Testing Starter Kit

Welcome to the Edument CQRS and Intentful Testing Starter Kit project page. On this page, you will find links to our open sourced CQRS Starter Kit on GitHub as well as tutorials to get you started.

Edument delivers awesome courses!

If you enjoy the content here, chances are you will really enjoy the course it was written for:

Applied Domain-Driven Design


Edument CQRS Starter Kit
What is the Start Kit?

A bunch of code to help you get started with writing intentful tests for a domain, expressing it as commands, events and exceptions. These ideas are often associated with the CQRS pattern.

Get it on Github

We're calling it "a bunch of code" because at the end of the day, that's what it is, as opposed to being a framework. You take the code, copy it into your project, and massage it to fit your needs.

Not using part of it? Just Delete It.

Wish something worked a little differently? Just Change It.

The idea is to give you a head start, saving you from writing - or working out how to write - this code yourself. In every non-trivial system where we've used this code, we've done some kind of modification to it. We expect you will experience the same need, and follow the same path.

Tutorials

To help you get started with the starter kit, we've assembled a 5-part tutorial. You might want to grab the source code before starting, since it is the bundled sample application that we will build in the tutorial.






Sample Tests
          
[Test]
public void OrderedDrinksCanBeServed() 
{
  Test(
      Given(new TabOpened
      {
       Id = testId,
       TableNumber = testTable,
       Waiter = testWaiter
      },
      new DrinksOrdered
      {
       Id = testId,
       Items = new List<OrderedItem>
       { testDrink1, testDrink2 }
      }),
      When(new MarkDrinksServed
      {
       Id = testId,
       MenuNumbers = new List<int>
      {testDrink1.MenuNumber,testDrink2.MenuNumber}
      }),
      Then(new DrinksServed
      {
       Id = testId,
       MenuNumbers = new List<int>
      {testDrink1.MenuNumber,testDrink2.MenuNumber}
      }));
}

[Test]
public void CanNotServeAnUnorderedDrink() 
{
    Test(
        Given(new TabOpened
        {
            Id = testId,
            TableNumber = testTable,
            Waiter = testWaiter
        },
        new DrinksOrdered
        {
            Id = testId,
            Items = new List<OrderedItem>
                 { testDrink1 }
        }),
        When(new MarkDrinksServed
        {
            Id = testId,
            MenuNumbers = new List<int>
                { testDrink2.MenuNumber }
        }),
        ThenFailWith <DrinksNotOutstanding>()); 
}
             





This FAQ is licensed under a Creative Commons Attribution. This means that you can freely use the material, as long as you provide a link back to this document

   Copyright © 2018 Edument AB Contact Us   Edument