/***
 * Excerpted from "Domain-Driven Design Using Naked Objects",
 * published by The Pragmatic Bookshelf.
 * Copyrights apply to this code. It may not be used to create training material, 
 * courses, books, articles, and the like. Contact us if you are in doubt.
 * We make no guarantees that this code is fit for any purpose. 
 * Visit http://www.pragmaticprogrammer.com/titles/dhnako for more book information.
***/
package com.pragprog.dhnako.carserv.fixture.vehicle;

import com.pragprog.dhnako.carserv.dom.customer.Customer;
import com.pragprog.dhnako.carserv.dom.vehicle.Car;

public class JoeBloggsCarsFixture extends AbstractCarFixture {
    public void install() {
    	Customer joeBloggs = findCustomer("Bloggs", "Joe");

    	Car fordFocusCar = createCar(joeBloggs, findModel(findMake("Ford"), "Focus"), "M321RNP");
    	bookService(fordFocusCar, 2003, 8, 23);
    	bookService(fordFocusCar, 2004, 6, 9);
    	bookService(fordFocusCar, 2005, 4, 30);
    	bookService(fordFocusCar, 2006, 2, 1);
    	bookService(fordFocusCar, 2006, 12, 19);
    	bookService(fordFocusCar, 2007, 10, 18);

    	Car toyotaYarisCar = createCar(joeBloggs, findModel(findMake("Toyota"), "Yaris"), "KL56WGF");
    	bookService(toyotaYarisCar, 2008, 1, 10);
    }

}
