public RideNowController(IDriverService driverService, ICarTypeService carTypeService, IUserService userService, IRideDetailsService rideDetailsService)
 {
     this.driverService = driverService;
     this.carTypeService = carTypeService;
     this.userService = userService;
     this.rideDetailsService = rideDetailsService;
 }
Beispiel #2
0
 public AthleteRepository(IHockeyPlayerService hockeyPlayerService, IDriverService driverService)
 {
     _hockeyPlayerService = hockeyPlayerService;
     _driverService = driverService;
     _drivers = new List<Driver>();
     _hockeyPlayers = new List<HockeyPlayer>();
     _goaltenders = new List<Goaltender>();
 }
Beispiel #3
0
 public ReportService(IUnitOfWork unitOfWork, 
     IPathService pathService, 
     IDriverService driverService,
     IFreightService freightService)
 {
     _pathService = pathService;
     _driverService = driverService;
     _freightService = freightService;
     _reports = unitOfWork.Set<Report>();
     _subReports = unitOfWork.Set<SubReport>();
 }
		public DriverServiceTest()
		{
			var aDriverList = new List<Driver>
			{
				new Driver
				{
					Address = "1 anystreet st",
					City = "anytown",
					Country = "United States",
					CustomerId = 1,
					FirstName = "Craig",
					LastName = "Smith",
					Id = 1,
					LicenseState = "MA",
					LicenseNumber = "12345",
					State = "MA",
					PostalCode = "12345"
				},
				new Driver
				{
					Address = "1 anystreet st",
					City = "anytown",
					Country = "United States",
					CustomerId = 1,
					FirstName = "Stephen",
					LastName = "Smith",
					Id = 2,
					LicenseState = "MA",
					LicenseNumber = "23456",
					State = "MA",
					PostalCode = "12345"
				}
			};

			var aDriverRepository = new Mock<IDriverRepository>();
			aDriverRepository.Setup(aItem => aItem.GetDriverByLastName(It.IsAny<string>())).Returns(
				(string theName) =>
					aDriverList);
			aDriverRepository.Setup(aItem => aItem.GetDriver(It.IsAny<int>())).Returns(
				(int theId) => aDriverList.FirstOrDefault(aItem => aItem.Id == theId));

			aDriverRepository.Setup(aItem => aItem.AddDriver(It.IsAny<Driver>())).Returns(
				(Driver theNewDriver) =>
				{
					theNewDriver.Id = aDriverList.Count + 1;
					aDriverList.Add(theNewDriver);
					return aDriverList.Count;
				});

			_svc = new DriverService(aDriverRepository.Object);
		}
 public FormulaOnePickrService(IDriverService driverService)
 {
     _driverService = driverService;
 }
 public DriverController(IDriverService driverService)
 {
     _driverService = driverService;
 }
 public DriverListViewModel(IDriverService driverService)
 {
     _driverService = driverService; 
     
     LoadDriversAsync();
 }
 public CabDurationController(IDriverService driverService, ICarTypeService carTypeService)
 {
     this.driverService = driverService;
     this.carTypeService = carTypeService;
 }
 public DriversController( IDriverService driverService )
 {
     DriverService = driverService;
 }
 public DriverDetailViewModel(IDriverService driverService)
 {
     _driverService = driverService;
 }
 public DriverController(IDriverService driverService, ICarTypeService carTypeService)
 {
     this.driverService = driverService;
     this.carTypeService = carTypeService;
 }
 public DriverListViewModel(IDriverService driverService, INavigationService navigationService)
 {
     _driverService = driverService;
     _navigationService = navigationService;
 }
		public DriverController(IDriverService theDriverService)
		{
			_driverService = theDriverService;
		}