public void WhenModificationIsCorrection( Fixture fixture, AddressId addressId, ImportHouseNumberMailCantonFromCrab importHouseNumberMailCantonFromCrab) { importHouseNumberMailCantonFromCrab = importHouseNumberMailCantonFromCrab .WithCrabModification(CrabModification.Correction); Assert(RegisteredAddressScenario(fixture) .Given <AddressPostalCodeWasChanged>(addressId) .When(importHouseNumberMailCantonFromCrab) .Then(addressId, new AddressPostalCodeWasCorrected(addressId, new PostalCode(importHouseNumberMailCantonFromCrab.MailCantonCode)), importHouseNumberMailCantonFromCrab.ToLegacyEvent())); }
public void ThenAddressPostalCodeWasRemovedWhenModificationIsDelete( Fixture fixture, AddressId addressId, AddressPostalCodeWasChanged addressPostalCodeWasChanged, AddressHouseNumberMailCantonWasImportedFromCrab addressHouseNumberMailCantonWasImportedFromCrab, ImportHouseNumberMailCantonFromCrab importHouseNumberMailCantonFromCrab ) { importHouseNumberMailCantonFromCrab = importHouseNumberMailCantonFromCrab .WithCrabModification(CrabModification.Delete) .WithCrabMailCantonCode(new CrabMailCantonCode(addressPostalCodeWasChanged.PostalCode)); addressHouseNumberMailCantonWasImportedFromCrab = addressHouseNumberMailCantonWasImportedFromCrab .WithCrabModification(CrabModification.Insert) .WithHouseNumberMailCantonId(importHouseNumberMailCantonFromCrab.HouseNumberMailCantonId) .WithPostalCode(addressPostalCodeWasChanged.PostalCode); Assert(RegisteredAddressScenario(fixture) .Given(addressId, addressPostalCodeWasChanged, addressHouseNumberMailCantonWasImportedFromCrab) .When(importHouseNumberMailCantonFromCrab) .Then(addressId, new AddressPostalCodeWasRemoved(addressId), importHouseNumberMailCantonFromCrab.ToLegacyEvent())); }