public async Task AddressPostalCodeWasRemovedSetsPostalCodeToNull( AddressWasRegistered addressWasRegistered, AddressPostalCodeWasChanged addressPostalCodeWasChanged, AddressPostalCodeWasRemoved addressPostalCodeWasRemoved) { await Assert( Given(addressWasRegistered, addressPostalCodeWasChanged, addressPostalCodeWasRemoved) .Expect(ctx => ctx.AddressList, new AddressListItem { AddressId = addressWasRegistered.AddressId, StreetNameId = addressWasRegistered.StreetNameId, HouseNumber = addressWasRegistered.HouseNumber, PostalCode = null })); }
public async Task AddressPostalCodeWasRemovedSetsPostalCodeToNull( AddressWasRegistered addressWasRegistered, AddressPostalCodeWasChanged addressPostalCodeWasChanged, AddressPostalCodeWasRemoved addressPostalCodeWasRemoved) { await Assert( Given(addressWasRegistered, addressPostalCodeWasChanged, addressPostalCodeWasRemoved) .Expect(ctx => ctx.AddressDetail, new AddressDetailItem { AddressId = addressWasRegistered.AddressId, StreetNameId = addressWasRegistered.StreetNameId, HouseNumber = addressWasRegistered.HouseNumber, PostalCode = null, VersionTimestamp = addressPostalCodeWasRemoved.Provenance.Timestamp })); }
private void When(AddressPostalCodeWasRemoved @event) { _postalCode = null; }