Exemplo n.º 1
0
        public void ProcessCommandToEvent()
        {
            var location = "Mayfair";

            var command = CommandFactory.Default.CreateCommand("command1", location, new CreateLocation(location));

            var commandEngine = DomainFactory.CreateCommandEngine(this.boundedContextModel, eventStore.Object);

            var events = commandEngine.Process(command);

            Assert.IsNotNull(@events.SingleOrDefault(e => e.EventBody is LocationCreated));

            this.eventStore.Verify(x => x.Store(location, events));
        }
Exemplo n.º 2
0
 public void CreateCommandEngine()
 {
     var commandEngine = DomainFactory.CreateCommandEngine(this.boundedContextModel, this.eventStore.Object);
 }