Example #1
0
        public void ThenAddressBecameIncompleteWhenModificationIsDelete(
            AddressId addressId,
            AddressWasRegistered addressWasRegistered,
            AddressWasProposed addressWasProposed,
            AddressWasOfficiallyAssigned addressWasOfficiallyAssigned,
            AddressWasPositioned addressWasPositioned,
            AddressBecameComplete addressBecameComplete,
            ImportHouseNumberStatusFromCrab importHouseNumberStatusFromCrab)
        {
            importHouseNumberStatusFromCrab = importHouseNumberStatusFromCrab.WithCrabModification(CrabModification.Delete);

            Assert(new Scenario()
                   .Given(addressId,
                          addressWasRegistered,
                          addressWasProposed,
                          addressWasOfficiallyAssigned,
                          addressWasPositioned,
                          addressBecameComplete)
                   .When(importHouseNumberStatusFromCrab)
                   .Then(addressId,
                         new AddressStatusWasRemoved(addressId),
                         new AddressOfficialAssignmentWasRemoved(addressId),
                         new AddressBecameIncomplete(addressId),
                         importHouseNumberStatusFromCrab.ToLegacyEvent()));
        }
Example #2
0
        public void WithStatusProposedWhenModificationIsDelete(
            AddressId addressId,
            AddressWasRegistered addressWasRegistered,
            ImportHouseNumberStatusFromCrab importHouseNumberStatusFromCrab)
        {
            importHouseNumberStatusFromCrab = importHouseNumberStatusFromCrab
                                              .WithCrabModification(CrabModification.Delete)
                                              .WithStatus(CrabAddressStatus.Proposed);

            Assert(new Scenario()
                   .Given(addressId,
                          addressWasRegistered)
                   .When(importHouseNumberStatusFromCrab)
                   .Then(addressId,
                         importHouseNumberStatusFromCrab.ToLegacyEvent()));
        }