Exemplo n.º 1
0
        public void ReturnCabToPoolByIdShouldCallAddCabToPool()
        {
            var cabLocationService = new Mock <ICabLocationService>();
            var availableCabsRepo  = new Mock <IAvailableCabsRepository>();

            var availableCabsService = new AvailableCabsService(cabLocationService.Object, availableCabsRepo.Object);

            availableCabsService.ReturnCabToPool("1");

            availableCabsRepo.Verify(a => a.AddCabToPool("1"));
        }
Exemplo n.º 2
0
        public void ReturnCabToPoolShouldCallAddCabToPool()
        {
            var cab = new Domain.Cab("1", "Toyota", CabType.Regular);
            var cabLocationService = new Mock <ICabLocationService>();
            var availableCabsRepo  = new Mock <IAvailableCabsRepository>();

            var availableCabsService = new AvailableCabsService(cabLocationService.Object, availableCabsRepo.Object);

            availableCabsService.ReturnCabToPool(cab);

            availableCabsRepo.Verify(a => a.AddCabToPool(cab));
        }