public void when_paymentmode_changed_from_cmt_to_ridelinq() { var newSettings = new ServerPaymentSettings { PaymentMode = PaymentMethod.RideLinqCmt }; _sut.When(new UpdatePaymentSettings { ServerPaymentSettings = newSettings }); Assert.AreEqual(1, _sut.Events.Count); var evt = _sut.ThenHasOne <PaymentSettingUpdated>(); _sut.ThenHasNo <PaymentModeChanged>(); Assert.AreEqual(_companyId, evt.SourceId); }
public void when_updating_account_notification_settings() { _sut.When(new AddOrUpdateNotificationSettings { AccountId = _accountId, CompanyId = _companyId, NotificationSettings = new NotificationSettings { Enabled = true, BookingConfirmationEmail = true, ConfirmPairingPush = true, NearbyTaxiPush = true, DriverAssignedPush = true, PaymentConfirmationPush = true, ReceiptEmail = true, PromotionUnlockedEmail = true, VehicleAtPickupPush = true, PromotionUnlockedPush = true, UnpairingReminderPush = true, DriverBailedPush = true, NoShowPush = true } }); _sut.ThenHasNo <NotificationSettingsAddedOrUpdated>(); var evt = _otherSut.ThenHasSingle <NotificationSettingsAddedOrUpdated>(); Assert.AreEqual(_accountId, evt.SourceId); Assert.AreEqual(_accountId, evt.NotificationSettings.Id); Assert.AreEqual(true, evt.NotificationSettings.Enabled); Assert.AreEqual(true, evt.NotificationSettings.BookingConfirmationEmail); Assert.AreEqual(true, evt.NotificationSettings.ConfirmPairingPush); Assert.AreEqual(true, evt.NotificationSettings.NearbyTaxiPush); Assert.AreEqual(true, evt.NotificationSettings.DriverAssignedPush); Assert.AreEqual(true, evt.NotificationSettings.PaymentConfirmationPush); Assert.AreEqual(true, evt.NotificationSettings.ReceiptEmail); Assert.AreEqual(true, evt.NotificationSettings.PromotionUnlockedEmail); Assert.AreEqual(true, evt.NotificationSettings.VehicleAtPickupPush); Assert.AreEqual(true, evt.NotificationSettings.PromotionUnlockedPush); Assert.AreEqual(true, evt.NotificationSettings.UnpairingReminderPush); Assert.AreEqual(true, evt.NotificationSettings.DriverBailedPush); Assert.AreEqual(true, evt.NotificationSettings.NoShowPush); }