Example #1
0
        public GetAddressesViewTests()
        {
            var associationId = "ass123";

            _addressAddedToAssociationEvent     = DomainEventHelper.Create <AddressAddedToAssociation>(associationId);
            _addressRemovedFromAssociationEvent = DomainEventHelper.Create <AddressRemovedFromAssociation>(associationId);
            _codeAssignedToAddressEvent         = DomainEventHelper.Create <CodeAssignedToAddress>(associationId);
        }
Example #2
0
 public void Handle(IViewContext context, AddressRemovedFromAssociation domainEvent)
 {
     _addresses.RemoveAll(a => a.Id == domainEvent.Id);
 }
Example #3
0
        public void Handle(IViewContext context, AddressRemovedFromAssociation domainEvent)
        {
            var associationId = domainEvent.GetAggregateRootId();

            GetAssociationAddressList(associationId).RemoveAll(a => a.Id == domainEvent.Id);
        }