Ejemplo n.º 1
0
        public void GivenTheFollowingExistingCar(Table table)
        {
            var values = table.Rows.Single();

            _actor.AttemptsTo(DeleteCar.WithRegistration(values["Registration"]));

            int customerId = _actor.AsksFor(StoredCustomerId.ForName(values["Customer"]));

            _actor.AttemptsTo(
                InsertCar.WithRegistration(values["Registration"])
                .ForCustomer(customerId)
                .WithMake(values.GetStringOrDefault("Make"))
                .WithModel(values.GetStringOrDefault("Model"))
                .MotExpiringOn(values.GetDateOrDefault("MOT Expiry"))
                .SuppressingMotReminder(values.GetBoolOrDefault("Suppress MOT Reminder")));

            _storedCar = _actor.AsksFor(StoredCar.WithRegistration(values["Registration"]));
        }
Ejemplo n.º 2
0
 public void GivenThereIsNoCarWithRegistration(string registration)
 {
     _actor.AttemptsTo(DeleteCar.WithRegistration(registration));
 }