public void managers_with_two_parkinglots_and_two_parking_boys_should_print_its_avaliable_position() { var manager = new Manager(); manager.Manage(new Parkinglot(1)); manager.Manage(new Parkinglot(2)); var parkingBoy = new ParkingBoy(new MaxAvailableRate()); parkingBoy.Manage(new Parkinglot(2)); manager.Manage(parkingBoy); var parkingBoy1 = new ParkingBoy(new MaxAvailableRate()); parkingBoy1.Manage(new Parkinglot(2)); parkingBoy1.Manage(new Parkinglot(3)); manager.Manage(parkingBoy1); var report = manager.Print(new Reporter()); var expectedReport = "manager:\r\n" + " parkinglot: 1\r\n" + " parkinglot: 2\r\n" + " parkingboy:\r\n" + " parkinglot: 2\r\n" + " parkingboy:\r\n" + " parkinglot: 2\r\n" + " parkinglot: 3\r\n"; Assert.AreEqual(expectedReport, report); }
public string FetchCarCustomer(Ticket ticket, ParkingBoy parkingBoy) { /* * string car = string.Empty; * if (parkingBoy is SmartParkingBoy) * { * SmartParkingBoy smartParkingBoy = (SmartParkingBoy)parkingBoy; * car = smartParkingBoy.FetchCarBoy(ticket); * } * if(parkingBoy is SuperSmartParkingBoy) * { } */ var car = parkingBoy.FetchCarBoy(ticket); return(car); }
public void HireBoy(ParkingBoy employee) { manageList.Add(employee); }
public void PassCarToParkingBoy(ParkingBoy parkingBoy) { this.myTickets.Add(parkingBoy.ParkCar(this.myCar, out var errorMessage)); AddMessage(errorMessage); }
public void RemoveParkingBoy(ParkingBoy parkingBoy) { parkingBoys.Remove(parkingBoy); }
public void AddParkingBoy(ParkingBoy parkingBoy) { parkingBoys.Add(parkingBoy); }
public void parkingboy_with_one_parkinglot_should_print_its_avaliable_position() { var parkingBoy = new ParkingBoy(new AnyNotFull()); parkingBoy.Manage(new Parkinglot(1)); var report = parkingBoy.Print(new Reporter()); var expectedReport = "parkingboy:\r\n" + " parkinglot: 1\r\n"; Assert.AreEqual(expectedReport, report); }
public void SetUp() { parkingBoy = new ParkingBoy(new AnyNotFull()); }
public Ticket ParkCarCustomer(Car car, ParkingBoy parkingBoy) { Ticket ticket = parkingBoy.ParkCarBoy(car, this.Id); return(ticket); }
public void AddParkingBoy(ParkingBoy newParkingBoy) { manageParkingBoys.Add(newParkingBoy); }
public void SetUp() { smartBoy = new ParkingBoy(new MaxAvailablePosition()); }
public bool ManageParkingBoy(ParkingBoy parkingBoy) { return(this.parkingBoys.Contains(parkingBoy)); }
public Car FetchCarByParkingBoy(ParkingTicket parkingTicket, ParkingBoy parkingBoy, out string errorMessage) { return(parkingBoy.FetchCar(parkingTicket, out errorMessage)); }
public ParkingTicket ParkCarByParkingBoy(Car car, ParkingBoy parkingBoy, out string errorMessage) { return(parkingBoy.ParkCar(car, out errorMessage)); }