Exemplo n.º 1
0
        public void WhenIUpdateTheCarResourceWithTheFollowingChanges(Table table)
        {
            _storedCar.Should().NotBeNull();

            var values = table.Rows.Single();

            _updatedCarInput = new CarInfo
            {
                Registration        = _storedCar.Registration,
                CustomerId          = _storedCar.CustomerId,
                Make                = _storedCar.Make,
                Model               = values["Model"],
                MotExpiry           = values.GetDateOrDefault("MOT Expiry"),
                SuppressMotReminder = _storedCar.SuppressMotReminder
            };

            _lastResponse.Response = _actor.Calls(Put.Resource(_updatedCarInput).At($"api/car/{_updatedCarInput.Registration}"));
        }
Exemplo n.º 2
0
        public void WhenIUpdateTheCustomerResourceWithTheFollowingChanges(Table table)
        {
            _storedCustomer.Should().NotBeNull();

            var values = table.Rows.Single();

            _updatedCustomerInput = new CustomerInfo
            {
                Title               = _storedCustomer.Title,
                Name                = _storedCustomer.Name,
                AddressLine1        = _storedCustomer.AddressLine1,
                AddressLine2        = _storedCustomer.AddressLine2,
                AddressLine3        = _storedCustomer.AddressLine3,
                Postcode            = _storedCustomer.Postcode,
                HomePhone           = _storedCustomer.HomePhone,
                Mobile              = values["Mobile"],
                HasAccountInvoicing = values.GetBoolOrDefault("Account Invoicing")
            };

            _lastResponse.Response = _actor.Calls(Put.Resource(_updatedCustomerInput).At($"api/customer/{_storedCustomer.CustomerId}"));
        }