public void ThenAddressBecameIncompleteWhenModificationIsDelete(
            AddressId addressId,
            AddressWasRegistered addressWasRegistered,
            AddressWasProposed addressWasProposed,
            AddressWasOfficiallyAssigned addressWasOfficiallyAssigned,
            AddressWasPositioned addressWasPositioned,
            AddressBecameComplete addressBecameComplete,
            ImportSubaddressStatusFromCrab importSubaddressStatusFromCrab)
        {
            importSubaddressStatusFromCrab = importSubaddressStatusFromCrab.WithCrabModification(CrabModification.Delete);

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

            Assert(new Scenario()
                   .Given(addressId,
                          addressWasRegistered)
                   .When(importSubaddressStatusFromCrab)
                   .Then(addressId,
                         importSubaddressStatusFromCrab.ToLegacyEvent()));
        }
Exemplo n.º 3
0
        public void WithStatusCurrentWhenModificationIsDelete(AddressId addressId,
                                                              AddressWasRegistered addressWasRegistered,
                                                              AddressBecameCurrent addressBecameCurrent,
                                                              AddressWasOfficiallyAssigned addressWasOfficiallyAssigned,
                                                              ImportSubaddressStatusFromCrab importSubaddressStatusFromCrab)
        {
            importSubaddressStatusFromCrab = importSubaddressStatusFromCrab
                                             .WithCrabModification(CrabModification.Delete);

            Assert(new Scenario()
                   .Given(addressId,
                          addressWasRegistered,
                          addressBecameCurrent,
                          addressWasOfficiallyAssigned
                          )
                   .When(importSubaddressStatusFromCrab)
                   .Then(addressId,
                         new AddressStatusWasRemoved(addressId),
                         new AddressOfficialAssignmentWasRemoved(addressId),
                         importSubaddressStatusFromCrab.ToLegacyEvent()));
        }