コード例 #1
0
 public async Task AddressPostalCodeWasRemovedSetsPostalCodeToNull(
     AddressWasRegistered addressWasRegistered,
     AddressPostalCodeWasChanged addressPostalCodeWasChanged,
     AddressPostalCodeWasRemoved addressPostalCodeWasRemoved)
 {
     await Assert(
         Given(addressWasRegistered,
               addressPostalCodeWasChanged,
               addressPostalCodeWasRemoved)
         .Expect(ctx => ctx.AddressList, new AddressListItem
     {
         AddressId    = addressWasRegistered.AddressId,
         StreetNameId = addressWasRegistered.StreetNameId,
         HouseNumber  = addressWasRegistered.HouseNumber,
         PostalCode   = null
     }));
 }
コード例 #2
0
 public async Task AddressPostalCodeWasRemovedSetsPostalCodeToNull(
     AddressWasRegistered addressWasRegistered,
     AddressPostalCodeWasChanged addressPostalCodeWasChanged,
     AddressPostalCodeWasRemoved addressPostalCodeWasRemoved)
 {
     await Assert(
         Given(addressWasRegistered,
               addressPostalCodeWasChanged,
               addressPostalCodeWasRemoved)
         .Expect(ctx => ctx.AddressDetail, new AddressDetailItem
     {
         AddressId        = addressWasRegistered.AddressId,
         StreetNameId     = addressWasRegistered.StreetNameId,
         HouseNumber      = addressWasRegistered.HouseNumber,
         PostalCode       = null,
         VersionTimestamp = addressPostalCodeWasRemoved.Provenance.Timestamp
     }));
 }
コード例 #3
0
 private void When(AddressPostalCodeWasRemoved @event)
 {
     _postalCode = null;
 }