Esempio n. 1
0
        public void when_expiring_order_then_notifies()
        {
            sut.When(new RejectOrder {
                OrderId = OrderId
            });

            var @event = sut.ThenHasSingle <OrderExpired>();

            Assert.Equal(OrderId, @event.SourceId);
        }
Esempio n. 2
0
        public void when_hidding_rating_type()
        {
            _sut.When(new HideRatingType {
                CompanyId = _companyId, RatingTypeId = _ratingTypeId
            });

            var evt = _sut.ThenHasSingle <RatingTypeHidded>();

            Assert.AreEqual(_companyId, evt.SourceId);
            Assert.AreEqual(_ratingTypeId, evt.RatingTypeId);
        }
Esempio n. 3
0
        public void when_deleting_tariff()
        {
            _sut.When(new DeleteTariff {
                CompanyId = _companyId, TariffId = _tariffId
            });

            var evt = _sut.ThenHasSingle <TariffDeleted>();

            Assert.AreEqual(_companyId, evt.SourceId);
            Assert.AreEqual(_tariffId, evt.TariffId);
        }
        public void when_address_removed_successfully()
        {
            _sut.When(new RemoveFavoriteAddress {
                AccountId = _accountId, AddressId = _addressId
            });

            var evt = _sut.ThenHasSingle <FavoriteAddressRemoved>();

            Assert.AreEqual(_accountId, evt.SourceId);
            Assert.AreEqual(_addressId, evt.AddressId);
        }
Esempio n. 5
0
        public void when_paymentsettings_updated_successfully()
        {
            var key         = Guid.NewGuid().ToString();
            var newSettings = new ServerPaymentSettings
            {
                PaymentMode             = PaymentMethod.Cmt,
                BraintreeClientSettings =
                {
                    ClientKey = key
                }
            };


            _sut.When(new UpdatePaymentSettings
            {
                ServerPaymentSettings = newSettings
            });


            var evt = _sut.ThenHasSingle <PaymentSettingUpdated>();

            _sut.ThenHasNo <PaymentModeChanged>(); //dont delete cc if payment mode doesnt change

            Assert.AreEqual(_companyId, evt.SourceId);
            Assert.AreEqual(key, evt.ServerPaymentSettings.BraintreeClientSettings.ClientKey);

            Assert.AreSame(newSettings, evt.ServerPaymentSettings);
        }
Esempio n. 6
0
        public void when_initiating_a_payment()
        {
            const string transactionId = "transaction123456";
            var          orderId       = Guid.NewGuid();
            var          paymentId     = Guid.NewGuid();
            var          token         = Guid.NewGuid().ToString();
            var          amount        = 12.34m;
            var          meter         = 10;
            var          tip           = 5;
            var          companyKey    = "Apcurium";

            _sut.When(new InitiateCreditCardPayment
            {
                PaymentId     = paymentId,
                TransactionId = transactionId,
                Amount        = amount,
                OrderId       = orderId,
                CardToken     = token,
                Provider      = PaymentProvider.Cmt,
                Tip           = tip,
                Meter         = meter,
                CompanyKey    = companyKey
            });

            var @event = _sut.ThenHasSingle <CreditCardPaymentInitiated>();

            Assert.AreEqual(paymentId, @event.SourceId);
            Assert.AreEqual(orderId, @event.OrderId);
            Assert.AreEqual(transactionId, @event.TransactionId);
            Assert.AreEqual(amount, @event.Amount);
            Assert.AreEqual(token, @event.CardToken);
            Assert.AreEqual(tip, @event.Tip);
            Assert.AreEqual(meter, @event.Meter);
            Assert.AreEqual(companyKey, @event.CompanyKey);
        }
Esempio n. 7
0
        public void when_capturing_the_payment()
        {
            var accountId = Guid.NewGuid();

            _sut.When(new CaptureCreditCardPayment
            {
                PaymentId                = _paymentId,
                MeterAmount              = 20,
                TotalAmount              = 24,
                TipAmount                = 2,
                TaxAmount                = 2,
                TollAmount               = 2.4m,
                SurchargeAmount          = 1,
                AccountId                = accountId,
                TransactionId            = "123",
                IsForPrepaidOrder        = true,
                IsSettlingOverduePayment = true,
                NewCardToken             = "fjff",
                FeeType                = FeeTypes.Cancellation,
                BookingFees            = 5m,
                AmountSavedByPromotion = 1,
                AuthorizationCode      = "authcode",
                PromotionUsed          = _promoId,
                Provider               = PaymentProvider.Braintree
            });

            var @event = _sut.ThenHasSingle <CreditCardPaymentCaptured_V2>();

            Assert.AreEqual("123", @event.TransactionId);
            Assert.AreEqual(24, @event.Amount);
            Assert.AreEqual(20, @event.Meter);
            Assert.AreEqual(2, @event.Tip);
            Assert.AreEqual(2, @event.Tax);
            Assert.AreEqual(2.4, @event.Toll);
            Assert.AreEqual(1, @event.Surcharge);
            Assert.AreEqual(_orderId, @event.OrderId);
            Assert.AreEqual(accountId, @event.AccountId);
            Assert.AreEqual("fjff", @event.NewCardToken);
            Assert.AreEqual(true, @event.IsSettlingOverduePayment);
            Assert.AreEqual(true, @event.IsForPrepaidOrder);
            Assert.AreEqual(5, @event.BookingFees);
            Assert.AreEqual(1, @event.AmountSavedByPromotion);
            Assert.AreEqual("authcode", @event.AuthorizationCode);
            Assert.AreEqual(_promoId, @event.PromotionUsed);
            Assert.AreEqual(PaymentProvider.Braintree, @event.Provider);
            Assert.AreEqual(FeeTypes.Cancellation, @event.FeeType);
        }
Esempio n. 8
0
        public void when_company_default_address_updated_successfully()
        {
            _sut.When(new UpdateDefaultFavoriteAddress
            {
                Address =
                    new Address
                {
                    Id           = _addressId,
                    FriendlyName = "Chez Costo",
                    FullAddress  = "1234 rue Saint-Hubert",
                    BuildingName = "Hôtel de Ville"
                }
            });

            var evt = _sut.ThenHasSingle <DefaultFavoriteAddressUpdated>();

            Assert.AreEqual(_addressId, evt.Address.Id);
            Assert.AreEqual("Hôtel de Ville", evt.Address.BuildingName);
        }
        public void when_registering_company_successfully()
        {
            _sut.When(new CreateCompany {
                CompanyId = _companyId
            });

            var @event = _sut.ThenHasSingle <CompanyCreated>();

            Assert.AreEqual(1, _sut.Events.Count);
            Assert.AreEqual(_companyId, @event.SourceId);
        }
        public void when_assigning_unassigned_seat_then_seat_is_assigned()
        {
            var command = new AssignSeat {
                SeatAssignmentsId = assignmentsId,
                Position          = 1,
                Attendee          = new PersonalInfo {
                    Email     = "*****@*****.**",
                    FirstName = "A",
                    LastName  = "Z"
                }
            };

            sut.When(command);

            var @event = sut.ThenHasSingle <SeatAssigned>();

            Assert.Equal(1, @event.Position);
            Assert.Equal(seatType, @event.SeatType);
            Assert.Equal(assignmentsId, @event.SourceId);
            Assert.Equal(command.Attendee, @event.Attendee);
        }
        public void when_company_popular_address_updated_successfully()
        {
            _sut.When(new UpdatePopularAddress
            {
                Address =
                    new Address
                {
                    Id           = _addressId,
                    FriendlyName = "Chez Costo popular",
                    FullAddress  = "1234 rue Saint-Hubert",
                    BuildingName = "Hôtel de Ville",
                    Latitude     = 45.515065,
                    Longitude    = -73.558064
                }
            });

            var evt = _sut.ThenHasSingle <PopularAddressUpdated>();

            Assert.AreEqual(_addressId, evt.Address.Id);
            Assert.AreEqual("Hôtel de Ville", evt.Address.BuildingName);
        }
Esempio n. 12
0
        public void when_creating_an_order_successfully()
        {
            var pickupDate = DateTime.Now;
            var orderId    = Guid.NewGuid();

            var rideLinqPairing = new CreateOrderForManualRideLinqPair
            {
                AccountId          = _accountId,
                ClientLanguageCode = "fr",
                UserAgent          = "TestUserAgent",
                ClientVersion      = "1.0.0",
                PairingCode        = "0000000",
                PairingDate        = pickupDate,
                PairingToken       = "TESTTOKEN",
                Distance           = 0f,
                OrderId            = orderId,
                Medallion          = "3",
                DeviceName         = "EH1234",
                Fare = 12f,
                FareAtAlternateRate = 13f,
                RateAtTripEnd       = 99f,
                RateAtTripStart     = 3f,
                RateChangeTime      = "10",
                Extra     = 50f,
                Surcharge = 40f,
                Tax       = 9f,
                Tip       = 14f,
                Toll      = 7f,
                Total     = 5f
            };

            _sut.When(rideLinqPairing);

            var rideLinqPaired = _sut.ThenHasSingle <OrderManuallyPairedForRideLinq>();

            Assert.AreEqual(_accountId, rideLinqPaired.AccountId);
            Assert.AreEqual(pickupDate, rideLinqPaired.PairingDate);
            Assert.AreEqual(orderId, rideLinqPaired.SourceId);
            Assert.AreEqual(50f, rideLinqPaired.Extra);
            Assert.AreEqual("3", rideLinqPaired.Medallion);
            Assert.AreEqual("EH1234", rideLinqPaired.DeviceName);
            Assert.AreEqual(0f, rideLinqPaired.Distance);
            Assert.AreEqual(12f, rideLinqPaired.Fare);
            Assert.AreEqual(13f, rideLinqPaired.FareAtAlternateRate);
            Assert.AreEqual(99f, rideLinqPaired.RateAtTripEnd);
            Assert.AreEqual(3f, rideLinqPaired.RateAtTripStart);
            Assert.AreEqual("10", rideLinqPaired.RateChangeTime);
            Assert.AreEqual(40f, rideLinqPaired.Surcharge);
            Assert.AreEqual(9f, rideLinqPaired.Tax);
            Assert.AreEqual(14f, rideLinqPaired.Tip);
            Assert.AreEqual(7f, rideLinqPaired.Toll);
            Assert.AreEqual(5f, rideLinqPaired.Total);
        }
Esempio n. 13
0
        public void when_order_confirmed_then_seats_assignments_created()
        {
            sut.When(new OrderConfirmed {
                SourceId = orderId
            });

            var @event = sut.ThenHasSingle <SeatAssignmentsCreated>();

            // We do not reuse the order id.
            Assert.NotEqual(orderId, @event.SourceId);
            Assert.Equal(orderId, @event.OrderId);
            Assert.Equal(15, @event.Seats.Count());
        }
        public void when_updating_credit_card()
        {
            const string creditCardCompany = "mastercard";
            const string nameOnCard        = "Bob 2";
            var          creditCardId      = Guid.NewGuid();
            const string last4Digits       = "4025";
            const string expirationMonth   = "5";
            const string expirationYear    = "2020";
            const string token             = "jjwcnSLWm85";

            _sut.Given(new CreditCardAddedOrUpdated {
                SourceId = _accountId, CreditCardId = creditCardId
            });

            _sut.When(new AddOrUpdateCreditCard
            {
                AccountId         = _accountId,
                CreditCardCompany = creditCardCompany,
                CreditCardId      = creditCardId,
                NameOnCard        = nameOnCard,
                Last4Digits       = last4Digits,
                ExpirationMonth   = expirationMonth,
                ExpirationYear    = expirationYear,
                Token             = token,
                Id = Guid.NewGuid()
            });

            var @event = _sut.ThenHasSingle <CreditCardAddedOrUpdated>();

            Assert.AreEqual(_accountId, @event.SourceId);
            Assert.AreEqual(creditCardCompany, @event.CreditCardCompany);
            Assert.AreEqual(nameOnCard, @event.NameOnCard);
            Assert.AreEqual(creditCardId, @event.CreditCardId);
            Assert.AreEqual(last4Digits, @event.Last4Digits);
            Assert.AreEqual(expirationMonth, @event.ExpirationMonth);
            Assert.AreEqual(expirationYear, @event.ExpirationYear);
            Assert.AreEqual(token, @event.Token);
        }
        public void when_registering_account_successfully()
        {
            _sut.When(new RegisterAccount
            {
                AccountId        = _accountId,
                Name             = "Bob Smith",
                Phone            = "5145551111",
                Country          = new CountryISOCode("CA"),
                Password         = "******",
                Email            = "*****@*****.**",
                Language         = "fr",
                ConfimationToken = "token"
            });

            var @event = _sut.ThenHasSingle <AccountRegistered>();

            Assert.AreEqual(_accountId, @event.SourceId);
            Assert.AreEqual("Bob Smith", @event.Name);
            Assert.IsNotEmpty(@event.Password);
            Assert.AreEqual("*****@*****.**", @event.Email);
            Assert.AreEqual("5145551111", @event.Phone);
            Assert.AreEqual("CA", @event.Country.Code);
            Assert.AreEqual("fr", @event.Language);
        }
        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);
        }
Esempio n. 17
0
        public void when_creating_a_promo_successfully()
        {
            _sut.When(new CreatePromotion
            {
                PromoId                 = _promoId,
                Name                    = "promo1",
                Description             = "promodesc1",
                Code                    = "code",
                AppliesToCurrentBooking = true,
                AppliesToFutureBooking  = false,
                DiscountType            = PromoDiscountType.Percentage,
                DiscountValue           = 10,
                DaysOfWeek              = new [] { DayOfWeek.Monday, DayOfWeek.Tuesday },
                MaxUsage                = 2,
                MaxUsagePerUser         = 1,
                StartDate               = new DateTime(2014, 11, 10),
                EndDate                 = new DateTime(2015, 11, 10),
                StartTime               = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 10, 0, 0),
                EndTime                 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 14, 0, 0),
                PublishedStartDate      = new DateTime(2014, 11, 9),
                PublishedEndDate        = new DateTime(2015, 11, 10)
            });

            var @event = _sut.ThenHasSingle <PromotionCreated>();

            Assert.AreEqual(_promoId, @event.SourceId);
            Assert.AreEqual("promo1", @event.Name);
            Assert.AreEqual("promodesc1", @event.Description);
            Assert.AreEqual("code", @event.Code);
            Assert.AreEqual(true, @event.AppliesToCurrentBooking);
            Assert.AreEqual(false, @event.AppliesToFutureBooking);
            Assert.AreEqual(PromoDiscountType.Percentage, @event.DiscountType);
            Assert.AreEqual(10, @event.DiscountValue);
            Assert.AreEqual(2, @event.MaxUsage);
            Assert.AreEqual(1, @event.MaxUsagePerUser);
            Assert.AreEqual(2, @event.DaysOfWeek.Count());
            Assert.AreEqual(new DateTime(2014, 11, 10), @event.StartDate);
            Assert.AreEqual(new DateTime(2015, 11, 10), @event.EndDate);
            Assert.AreEqual(new TimeSpan(10, 0, 0), @event.StartTime.Value.TimeOfDay);
            Assert.AreEqual(new TimeSpan(14, 0, 0), @event.EndTime.Value.TimeOfDay);
            Assert.AreEqual(new DateTime(2014, 11, 9), @event.PublishedStartDate);
            Assert.AreEqual(new DateTime(2015, 11, 10), @event.PublishedEndDate);
        }
Esempio n. 18
0
        public void when_updating_promo_successfully()
        {
            _sut.When(new UpdatePromotion
            {
                PromoId                 = _promoId,
                Name                    = "promo2",
                Description             = "promodesc2",
                Code                    = "code2",
                AppliesToCurrentBooking = false,
                AppliesToFutureBooking  = true,
                DiscountType            = PromoDiscountType.Cash,
                DiscountValue           = 15,
                DaysOfWeek              = new[] { DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday },
                MaxUsage                = 5
            });

            var @event = _sut.ThenHasSingle <PromotionUpdated>();

            Assert.AreEqual(_promoId, @event.SourceId);
            Assert.AreEqual("promo2", @event.Name);
            Assert.AreEqual("promodesc2", @event.Description);
            Assert.AreEqual("code2", @event.Code);
            Assert.AreEqual(false, @event.AppliesToCurrentBooking);
            Assert.AreEqual(true, @event.AppliesToFutureBooking);
            Assert.AreEqual(PromoDiscountType.Cash, @event.DiscountType);
            Assert.AreEqual(15, @event.DiscountValue);
            Assert.AreEqual(5, @event.MaxUsage);
            Assert.AreEqual(null, @event.MaxUsagePerUser);
            Assert.AreEqual(3, @event.DaysOfWeek.Count());
            Assert.AreEqual(null, @event.StartDate);
            Assert.AreEqual(null, @event.EndDate);
            Assert.AreEqual(null, @event.StartTime);
            Assert.AreEqual(null, @event.EndTime);
            Assert.AreEqual(null, @event.PublishedStartDate);
            Assert.AreEqual(null, @event.PublishedEndDate);
        }
        public void when_adding_an_company_default_address_successfully()
        {
            var addressId = Guid.NewGuid();

            _sut.When(new AddDefaultFavoriteAddress
            {
                Address = new Address
                {
                    Id           = addressId,
                    FriendlyName = "Chez François",
                    Apartment    = "3939",
                    FullAddress  = "1234 rue Saint-Hubert",
                    RingCode     = "3131",
                    BuildingName = "Hôtel de Ville",
                    Latitude     = 45.515065,
                    Longitude    = -73.558064
                }
            });

            var evt = _sut.ThenHasSingle <DefaultFavoriteAddressAdded>();

            Assert.AreEqual(addressId, evt.Address.Id);
            Assert.AreEqual("Chez François", evt.Address.FriendlyName);
            Assert.AreEqual("3939", evt.Address.Apartment);
            Assert.AreEqual("1234 rue Saint-Hubert", evt.Address.FullAddress);
            Assert.AreEqual("3131", evt.Address.RingCode);
            Assert.AreEqual("Hôtel de Ville", evt.Address.BuildingName);
            Assert.AreEqual(45.515065, evt.Address.Latitude);
            Assert.AreEqual(-73.558064, evt.Address.Longitude);
        }
Esempio n. 20
0
        public void when_creating_an_order_successfully()
        {
            var pickupDate = DateTime.Now;
            var order      = new CreateOrder
            {
                AccountId     = _accountId,
                PickupDate    = pickupDate,
                PickupAddress =
                    new Address
                {
                    RingCode    = "3131",
                    Latitude    = 45.515065,
                    Longitude   = -73.558064,
                    FullAddress = "1234 rue Saint-Hubert",
                    Apartment   = "3939"
                },
                DropOffAddress =
                    new Address {
                    Latitude = 45.50643, Longitude = -73.554052, FullAddress = "Velvet auberge st gabriel"
                },
                ClientLanguageCode = "fr",
                UserLatitude       = 46.50643,
                UserLongitude      = -74.554052,
                UserAgent          = "TestUserAgent",
                ClientVersion      = "1.0.0",
                UserNote           = "une note",
                BookingFees        = 5m,
                Market             = "MTL",
                CompanyKey         = "Kramerica",
                CompanyName        = "Kramerica Industries",
                EstimatedFare      = 50.5,
                IsChargeAccountPaymentWithCardOnFile = true,
                IsPrepaid            = true,
                OriginatingIpAddress = "192.168.12.30",
                KountSessionId       = "1i3u13n123"
            };

            order.Settings = new BookingSettings
            {
                ChargeTypeId   = 99,
                VehicleTypeId  = 88,
                ProviderId     = 11,
                Phone          = "5145551212",
                Passengers     = 6,
                NumberOfTaxi   = 1,
                Name           = "Joe Smith",
                AccountNumber  = "account",
                CustomerNumber = "customer",
                PayBack        = "123"
            };

            _sut.When(order);

            var orderCreated = _sut.ThenHasSingle <OrderCreated>();

            Assert.AreEqual(_accountId, orderCreated.AccountId);
            Assert.AreEqual(pickupDate, orderCreated.PickupDate);
            Assert.AreEqual("3939", orderCreated.PickupAddress.Apartment);
            Assert.AreEqual("1234 rue Saint-Hubert", orderCreated.PickupAddress.FullAddress);
            Assert.AreEqual("3131", orderCreated.PickupAddress.RingCode);
            Assert.AreEqual(45.515065, orderCreated.PickupAddress.Latitude);
            Assert.AreEqual(-73.558064, orderCreated.PickupAddress.Longitude);
            Assert.AreEqual("Velvet auberge st gabriel", orderCreated.DropOffAddress.FullAddress);
            Assert.AreEqual(45.50643, orderCreated.DropOffAddress.Latitude);
            Assert.AreEqual(-73.554052, orderCreated.DropOffAddress.Longitude);
            Assert.AreEqual(99, orderCreated.Settings.ChargeTypeId);
            Assert.AreEqual(88, orderCreated.Settings.VehicleTypeId);
            Assert.AreEqual(11, orderCreated.Settings.ProviderId);
            Assert.AreEqual("5145551212", orderCreated.Settings.Phone);
            Assert.AreEqual(6, orderCreated.Settings.Passengers);
            Assert.AreEqual(1, orderCreated.Settings.NumberOfTaxi);
            Assert.AreEqual("Joe Smith", orderCreated.Settings.Name);
            Assert.AreEqual("account", orderCreated.Settings.AccountNumber);
            Assert.AreEqual("customer", orderCreated.Settings.CustomerNumber);
            Assert.AreEqual("123", orderCreated.Settings.PayBack);
            Assert.AreEqual("fr", orderCreated.ClientLanguageCode);
            Assert.AreEqual(46.50643, orderCreated.UserLatitude);
            Assert.AreEqual(-74.554052, orderCreated.UserLongitude);
            Assert.AreEqual("TestUserAgent", orderCreated.UserAgent);
            Assert.AreEqual("1.0.0", orderCreated.ClientVersion);
            Assert.AreEqual("une note", orderCreated.UserNote);
            Assert.AreEqual(5, orderCreated.BookingFees);
            Assert.AreEqual("MTL", orderCreated.Market);
            Assert.AreEqual("Kramerica", orderCreated.CompanyKey);
            Assert.AreEqual("Kramerica Industries", orderCreated.CompanyName);
            Assert.AreEqual(50.5, orderCreated.EstimatedFare);
            Assert.AreEqual(true, orderCreated.IsChargeAccountPaymentWithCardOnFile);
            Assert.AreEqual(true, orderCreated.IsPrepaid);
            Assert.AreEqual("192.168.12.30", orderCreated.OriginatingIpAddress);
            Assert.AreEqual("1i3u13n123", orderCreated.KountSessionId);
        }
        public void when_adding_ibs_order_info_to_order()
        {
            _sut.When(new AddIbsOrderInfoToOrder {
                OrderId = _orderId, IBSOrderId = 99
            });

            var @event = _sut.ThenHasSingle <IbsOrderInfoAddedToOrder>();

            Assert.AreEqual(_orderId, @event.SourceId);
            Assert.AreEqual(99, @event.IBSOrderId);
            Assert.AreEqual(false, @event.CancelWasRequested);
        }