Пример #1
0
        public void OrderShouldbeRejectedAndEventShouldbePublished()
        {
            //Create Order
            var order = orderService.CreateOrder(orderDetails);

            Assert.IsNotNull(order.Id);
            AssertEvent <OrderCreatedEvent>();
            //Reject Order
            orderService.RejectOrder(order.Id);
            AssertEvent <OrderRejectedEvent>();
        }
 public void Handle(IDomainEventEnvelope <CustomerValidationFailedEvent> customerValidationFailedEvent)
 {
     orderService.RejectOrder(customerValidationFailedEvent.Event.orderId);
 }