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
     }));
 }
예제 #2
0
        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()));
        }
예제 #3
0
 private void When(AddressWasCorrectedToNotOfficiallyAssigned @event)
 {
     _officiallyAssigned = false;
 }