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"])); }
public void GivenThereIsNoCarWithRegistration(string registration) { _actor.AttemptsTo(DeleteCar.WithRegistration(registration)); }