public void Then_Maps_Matching_Fields(ReservationCreatedEvent source) { ReservationCreatedNotificationEvent result = source; result.Should().BeEquivalentTo(source, options => options.ExcludingMissingMembers()); }
public async Task Then_Adds_StartDateDescription_To_Tokens( ReservationCreatedNotificationEvent createdEvent, NotificationTokenBuilder builder) { var tokens = await builder.BuildTokens(createdEvent); tokens[TokenKeyNames.StartDateDescription].Should() .Be($"{createdEvent.StartDate:MMM yyyy} to {createdEvent.EndDate:MMM yyyy}"); }
public async Task Then_Adds_ProviderName_To_Tokens( ReservationCreatedNotificationEvent createdEvent, ProviderDetails provider, [Frozen] Mock <IProviderService> mockProviderService, NotificationTokenBuilder builder) { mockProviderService .Setup(service => service.GetDetails(createdEvent.ProviderId.Value)) .ReturnsAsync(provider); var tokens = await builder.BuildTokens(createdEvent); tokens[TokenKeyNames.ProviderName].Should().Be(provider.Name); }