public async Task AddressWasCorrectedToNotOfficiallyAssignedSetsOfficallyAssignedFalse( AddressWasRegistered addressWasRegistered, AddressWasCorrectedToNotOfficiallyAssigned addressWasCorrectedToNotOfficiallyAssigned) { await Assert( Given(addressWasRegistered, addressWasCorrectedToNotOfficiallyAssigned) .Expect(ctx => ctx.AddressDetail, new AddressDetailItem { AddressId = addressWasRegistered.AddressId, StreetNameId = addressWasRegistered.StreetNameId, HouseNumber = addressWasRegistered.HouseNumber, OfficiallyAssigned = false, VersionTimestamp = addressWasCorrectedToNotOfficiallyAssigned.Provenance.Timestamp })); }
public void GivenWasCorrectedToNotOffiallyAssignedWhenStatusIsUnoffical( AddressId addressId, AddressWasRegistered addressWasRegistered, AddressWasCorrectedToNotOfficiallyAssigned addressWasCorrectedToNotOfficiallyAssigned, ImportSubaddressStatusFromCrab importSubaddressStatusFromCrab) { importSubaddressStatusFromCrab = importSubaddressStatusFromCrab .WithStatus(CrabAddressStatus.Unofficial); Assert(new Scenario() .Given(addressId, addressWasRegistered) .Given(addressId, addressWasCorrectedToNotOfficiallyAssigned) .When(importSubaddressStatusFromCrab) .Then(addressId, new AddressBecameCurrent(addressId), importSubaddressStatusFromCrab.ToLegacyEvent())); }
private void When(AddressWasCorrectedToNotOfficiallyAssigned @event) { _officiallyAssigned = false; }