public async Task AddressBoxNumberWasChangedChangesBoxNumber( AddressWasRegistered addressWasRegistered, AddressBoxNumberWasChanged addressBoxNumberWasChanged) { await Assert( Given(addressWasRegistered, addressBoxNumberWasChanged) .Expect(ctx => ctx.AddressList, new AddressListItem { AddressId = addressWasRegistered.AddressId, StreetNameId = addressWasRegistered.StreetNameId, HouseNumber = addressWasRegistered.HouseNumber, BoxNumber = addressBoxNumberWasChanged.BoxNumber })); }
public async Task AddressBoxNumberWasChangedChangesBoxNumber( AddressWasRegistered addressWasRegistered, AddressBoxNumberWasChanged addressBoxNumberWasChanged) { await Assert( Given(addressWasRegistered, addressBoxNumberWasChanged) .Expect(ctx => ctx.AddressDetail, new AddressDetailItem { AddressId = addressWasRegistered.AddressId, StreetNameId = addressWasRegistered.StreetNameId, HouseNumber = addressWasRegistered.HouseNumber, BoxNumber = addressBoxNumberWasChanged.BoxNumber, VersionTimestamp = addressBoxNumberWasChanged.Provenance.Timestamp })); }
public void ThenNoChangeWhenBoxNumberIsTheSame( Fixture fixture, AddressId addressId, AddressBoxNumberWasChanged addressBoxNumberWasChanged, ImportSubaddressFromCrab importSubaddressFromCrab ) { importSubaddressFromCrab = importSubaddressFromCrab .WithBoxNumber(new BoxNumber(addressBoxNumberWasChanged.BoxNumber)); Assert(RegisteredAddressScenario(fixture) .Given(addressId, addressBoxNumberWasChanged) .When(importSubaddressFromCrab) .Then(addressId, importSubaddressFromCrab.ToLegacyEvent())); }
private void When(AddressBoxNumberWasChanged @event) { _boxNumber = new BoxNumber(@event.BoxNumber); }