Example #1
0
 public NearbyTableViewSource(NearbyViewController nearByViewController,IBusStopRepository busStopRepository,  
          IList<BusStop> busStops)
     : base(nearByViewController, busStopRepository, busStops)
 {
     _refreshHeaderView = nearByViewController._refreshHeaderView;
     _tableView = nearByViewController._tableView;
     _nearbyViewController = nearByViewController;
 }
Example #2
0
 public RoutesController(IRouteRepository routeRepository, IRouteBusStopRepository routeBusStopRepository, IBusStopRepository busStopRepository, IRouteBusRepository routeBusRepository, IMapper mapper)
 {
     this._RouteRepository        = routeRepository;
     this._RouteBusStopRepository = routeBusStopRepository;
     this._RouteBusRepository     = routeBusRepository;
     this._BusStopRepository      = busStopRepository;
     this._Mapper = mapper;
 }
Example #3
0
 public void TestInit()
 {
     _timeCalculator     = new TimeCalculator();
     _routeRepository    = new RouteRepository();
     _busStopRepository  = new BusStopRepository();
     _scheduleRepository = new ScheduleRepository(_routeRepository, _busStopRepository);
     _scheduleService    = new ScheduleService(_scheduleRepository, _timeCalculator);
 }
Example #4
0
 public FavoritesPageVM(INavigationService navigationService,
                        IDialogService dialogService,
                        IBusStopRepository busStopRepository)
     : base(navigationService, dialogService)
 {
     _busStopRepository = busStopRepository;
     _busStopRepository.BusStopsDeletedEvent += (s, e) => BusStops = new List <BusStop>();
 }
 public SimpleBusStopTableViewSource(
          UIViewController controller, 
          IBusStopRepository busStopRepository,  
          IList<BusStop> busStops)
 {
     _controller = controller;
     _busStopRepository = busStopRepository;
     _busStops = busStops;
 }
Example #6
0
 public TabsPageVM(INavigationService navigationService,
                   IDialogService dialogService,
                   IGithubService githubService,
                   IBusStopRepository busStopRepository,
                   IAppUpdater appUpdater) : base(navigationService, dialogService)
 {
     _githubService     = githubService;
     _busStopRepository = busStopRepository;
     _locator           = CrossGeolocator.Current;
     _appUpdater        = appUpdater;
 }
        public BusStopsControllerTests()
        {
            var dbOptions = new DbContextOptionsBuilder <EFDbContext>()
                            .UseInMemoryDatabase(databaseName: "WebApiNinjectStudioDbInMemory")
                            .Options;
            var context = new EFDbContext(dbOptions);

            context.Database.EnsureCreated();

            this._EFRouteBusRepository = new EFRouteBusRepository(context);
            this._EFBusStopRepository  = new EFBusStopRepository(context);

            this._MockMapper = new MapperConfiguration(cfg => cfg.AddProfile(new AutoMapperProfile()))
                               .CreateMapper();
        }
Example #8
0
        public FavoritesViewController(IBusStopRepository busStopRepository)
        {
            _busStopRepository = busStopRepository;

            _editButton = new UIBarButtonItem(UIBarButtonSystemItem.Edit);
            _doneButton = new UIBarButtonItem(UIBarButtonSystemItem.Done);

            NavigationItem.RightBarButtonItem = _editButton;

            _editButton.Clicked += delegate {
                _tableView.Editing = true;
                Editing = true;
                NavigationItem.RightBarButtonItem = _doneButton;
            };

            _doneButton.Clicked += delegate {
                _tableView.Editing = false;
                Editing = false;
                NavigationItem.RightBarButtonItem = _editButton;
            };
        }
        public ScheduleRepository(IRouteRepository routeRepository, IBusStopRepository busStopRepository)
        {
            _routeRepository   = routeRepository;
            _busStopRepository = busStopRepository;

            //mocking bus stop list
            _allScheduleItems = new List <ScheduleItem>();
            var busStopList = _busStopRepository.GetAll();
            var routeList   = _routeRepository.GetAll();

            foreach (var route in routeList.Result)
            {
                foreach (var busStop in busStopList.Result)
                {
                    _allScheduleItems.Add(new ScheduleItem()
                    {
                        Route      = route,
                        BusStop    = busStop,
                        Departures = GetDepartureTimes(route, busStop)
                    });
                }
            }
        }
Example #10
0
 public AllStopsViewController(IBusStopRepository busStopRepository)
 {
     _busStopRepository = busStopRepository;
 }
Example #11
0
 public NearbyViewController(IBusStopRepository busStopRepository)
 {
     _busStopRepository = busStopRepository;
 }
Example #12
0
 public MostRecentViewController(IBusStopRepository busStopRepository)
 {
     _busStopRepository = busStopRepository;
 }
 public BusStopService(IBusStopRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }