Exemplo n.º 1
0
        public void MultipleCommandsExecuteCorrectly()
        {
            Guid id = Guid.NewGuid();
            var c1 = new AddOne(id);
            CommandRouter.ExecuteCommand(c1);
            var c2 = new MinusOne(id);
            CommandRouter.ExecuteCommand(c2);

            var aggregate = AggregateBuilder.Get<TestAggregate>(id);
            Assert.That(aggregate.Count, Is.EqualTo(0));
        }
Exemplo n.º 2
0
 public void On(MinusOne cmd)
 {
     FireEvent(new OneSubtracted(cmd.AggregateIdentity));
 }