public BookingRequestServiceTests(DatabaseTestFixture fixture)
        {
            var dbSettings = new MongoDbSettings {
                ConnectionString = fixture.Db.ConnectionString, Database = "Testing"
            };

            repo = new BookingRequestsRepository(Options.Create(dbSettings));
            var mockCustService = new Mock <ICustomerService>();
            var cust            = new Customer
            {
                Id       = Guid.NewGuid().ToString(),
                ClientId = new DBRef {
                    Id = Guid.NewGuid().ToString()
                },
                FirstName    = "FirstName",
                LastName     = "LastName",
                CustomerData = new CustomerData
                {
                    MyVehicles = new List <CustomerVehicle>
                    {
                        new CustomerVehicle {
                            Registration = "EF02VCC"
                        }
                    }
                }
            };

            mockCustService.Setup(x => x.GetById(It.IsAny <string>(), It.IsAny <string>())).Returns(Task.FromResult(cust));
            customerService = mockCustService.Object;
        }
 public BookingRequestController(ILog log, IEmailNotification emailNotification, IBookingRequestRepository bookingRequestRepository, IBookingMainRepository mainRepository, ITransactionRepository transactionRepository)
 {
     _log = log;
     _emailNotification = emailNotification;
     _bookingRequestRepository = bookingRequestRepository;
     _mainRepository = mainRepository;
     _transactionRepository = transactionRepository;
 }
Пример #3
0
 public BookingRequestController(
     IBookingRequestRepository bookingRequestRepo,
     IRoomTypeRepository roomTypeRepo,
     IBookingRepository bookingRepo,
     IMapper mapper,
     UserManager <Employee> userManager
     )
 {
     _bookingRequestRepo = bookingRequestRepo;
     _roomTypeRepo       = roomTypeRepo;
     _mapper             = mapper;
     _userManager        = userManager;
     _bookingRepo        = bookingRepo;
 }
 public BookingRequestService(IBookingRequestRepository bookings, ICustomerService customers)
 {
     this.bookings  = bookings;
     this.customers = customers;
 }
Пример #5
0
 public BookingRequestService(IBookingRequestRepository repository, AppDbContext context, IBookingRepository bookingRepository)
 {
     _repository        = repository;
     _context           = context;
     _bookingRepository = bookingRepository;
 }