public async Task GivenExistingBooking_WhenCruiseIsLocked_ShouldFailToUpdate() { var repository = GetBookingRepositoryForTest(); var cruise = await CruiseRepositoryTest.GetCruiseForTestAsync(); var booking = await GetNewlyCreatedBookingForTestAsync(cruise, repository); Assert.IsFalse(booking.IsLocked); var cruiseRepository = new CruiseRepository(); Assert.IsFalse(cruise.IsLocked); cruise.IsLocked = true; await cruiseRepository.UpdateMetadataAsync(cruise); var updateSource = GetBookingForTest(GetCabinForTest(SjoslagetDbExtensions.CabinTypeId, GetPaxForTest(firstName: "Förnamn1", lastName: "Efternamn1"))); updateSource.Reference = booking.Reference; try { await repository.UpdateAsync(cruise, updateSource); Assert.Fail("Update booking did not throw."); } catch (BookingException) { } }
public BookingListBLL() { BookingRepository = new BookingRepository(); CruiseRepository = new CruiseRepository(); TripRepository = new TripRepository(); CustomerRepository = new CustomerRepository(); }
public ViewMeetingsBLL() { ActivityRepository = new ActivityRepository(); AgencyRepository = new AgencyRepository(); AgencyContactRepository = new AgencyContactRepository(); CruiseRepository = new CruiseRepository(); }
public RoomServiceBLL() { RoomClassRepository = new RoomClassRepository(); RoomTypeRepository = new RoomTypeRepository(); CruiseRepository = new CruiseRepository(); TripRepository = new TripRepository(); }
public void Dispose() { if (BookingRepository != null) { BookingRepository.Dispose(); BookingRepository = null; } if (TripRepository != null) { TripRepository.Dispose(); TripRepository = null; } if (CruiseRepository != null) { CruiseRepository.Dispose(); CruiseRepository = null; } if (AgencyRepository != null) { AgencyRepository.Dispose(); AgencyRepository = null; } if (BookingRoomRepository != null) { BookingRoomRepository.Dispose(); BookingRoomRepository = null; } if (BookingHistoryRepository != null) { BookingHistoryRepository.Dispose(); BookingHistoryRepository = null; } if (LockedRepository != null) { LockedRepository.Dispose(); LockedRepository = null; } if (CustomerRepository != null) { CustomerRepository.Dispose(); CustomerRepository = null; } if (UserBLL != null) { UserBLL.Dispose(); UserBLL = null; } if (SeriesRepository != null) { SeriesRepository.Dispose(); SeriesRepository = null; } if (BusTypeRepository != null) { BusTypeRepository.Dispose(); BusTypeRepository = null; } }
public async void Insert_Ports_And_Return_OK() { List <Port> items = new List <Port>(); using (StreamReader r = new StreamReader("ports.json")) { items = JsonConvert.DeserializeObject <List <Port> >(r.ReadToEnd()); } CruiseRepository cruise = new CruiseRepository(); bool result = await cruise.InsertPorts(items); Assert.True(result); }
public DashBoardManagerBLL() { StoreProcedureRepository = new StoreProcedureRepository(); CruiseRepository = new CruiseRepository(); BookingRepository = new BookingRepository(); AgencyRepository = new AgencyRepository(); AgencyContactRepository = new AgencyContactRepository(); ActivityRepository = new ActivityRepository(); UserRepository = new UserRepository(); }
public AgencyViewBLL() { AgencyRepository = new AgencyRepository(); AgencyContractRepository = new AgencyContractRepository(); ContractRepository = new ContractRepository(); QuotationRepository = new QuotationRepository(); AgencyContactRepository = new AgencyContactRepository(); CruiseRepository = new CruiseRepository(); ActivityRepository = new ActivityRepository(); AgencyNotesRepository = new AgencyNotesRepository(); RoleRepository = new RoleRepository(); }
public BookingViewBLL() { BookingRepository = new BookingRepository(); TripRepository = new TripRepository(); CruiseRepository = new CruiseRepository(); AgencyRepository = new AgencyRepository(); BookingRoomRepository = new BookingRoomRepository(); BookingHistoryRepository = new BookingHistoryRepository(); LockedRepository = new LockedRepository(); CustomerRepository = new CustomerRepository(); UserUtil = new UserUtil(); }
public DashBoardBLL() { BookingRepository = new BookingRepository(); CruiseRepository = new CruiseRepository(); RoomClassRepository = new RoomClassRepository(); RoomTypeRepository = new RoomTypeRepository(); SailsModule = SailsModule.GetInstance(); ActivityRepository = new ActivityRepository(); AgencyRepository = new AgencyRepository(); AgencyContactRepository = new AgencyContactRepository(); CustomerRepository = new CustomerRepository(); GoldenDayRepository = new GoldenDayRepository(); }
public AddSeriesBookingsBLL() { AgencyRepository = new AgencyRepository(); AgencyContactRepository = new AgencyContactRepository(); SeriesRepository = new SeriesRepository(); TripRepository = new TripRepository(); RoomClassRepository = new RoomClassRepository(); RoomTypeRepository = new RoomTypeRepository(); CruiseRepository = new CruiseRepository(); BookingRepository = new BookingRepository(); BookingRoomRepository = new BookingRoomRepository(); CustomerRepository = new CustomerRepository(); }
public BookingViewBLL() { BookingRepository = new BookingRepository(); TripRepository = new TripRepository(); CruiseRepository = new CruiseRepository(); AgencyRepository = new AgencyRepository(); BookingRoomRepository = new BookingRoomRepository(); BookingHistoryRepository = new BookingHistoryRepository(); LockedRepository = new LockedRepository(); CustomerRepository = new CustomerRepository(); UserBLL = new UserBLL(); SeriesRepository = new SeriesRepository(); BusTypeRepository = new BusTypeRepository(); }
public BookingsController( BookingRepository bookingRepository, CruiseRepository cruiseRepository, DeletedBookingRepository deletedBookingRepository, AecPaymentRepository paymentRepository, ProductRepository productRepository, ReportingService reportingService) { _bookingRepository = bookingRepository; _cruiseRepository = cruiseRepository; _deletedBookingRepository = deletedBookingRepository; _paymentRepository = paymentRepository; _productRepository = productRepository; _reportingService = reportingService; }
public void Dispose() { if (BookingRepository != null) { BookingRepository.Dispose(); BookingRepository = null; } if (CruiseRepository != null) { CruiseRepository.Dispose(); CruiseRepository = null; } if (RoomClassRepository != null) { RoomClassRepository.Dispose(); RoomClassRepository = null; } if (RoomTypeRepository != null) { RoomTypeRepository.Dispose(); RoomTypeRepository = null; } if (ActivityRepository != null) { ActivityRepository.Dispose(); ActivityRepository = null; } if (AgencyRepository != null) { AgencyRepository.Dispose(); AgencyRepository = null; } if (AgencyContactRepository != null) { AgencyContactRepository.Dispose(); AgencyContactRepository = null; } if (CustomerRepository != null) { CustomerRepository.Dispose(); CustomerRepository = null; } if (GoldenDayRepository != null) { GoldenDayRepository.Dispose(); GoldenDayRepository = null; } }
public void Dispose() { if (BookingRepository != null) { BookingRepository.Dispose(); BookingRepository = null; } if (TripRepository != null) { TripRepository.Dispose(); TripRepository = null; } if (CruiseRepository != null) { CruiseRepository.Dispose(); CruiseRepository = null; } if (AgencyRepository != null) { AgencyRepository.Dispose(); AgencyRepository = null; } if (BookingRoomRepository != null) { BookingRoomRepository.Dispose(); BookingRoomRepository = null; } if (BookingHistoryRepository != null) { BookingHistoryRepository.Dispose(); BookingHistoryRepository = null; } if (LockedRepository != null) { LockedRepository.Dispose(); LockedRepository = null; } if (CustomerRepository != null) { CustomerRepository.Dispose(); CustomerRepository = null; } if (UserUtil != null) { UserUtil.Dispose(); UserUtil = null; } }
public void Dispose() { if (AgencyRepository != null) { AgencyRepository.Dispose(); AgencyRepository = null; } if (AgencyContractRepository != null) { AgencyContractRepository.Dispose(); AgencyContractRepository = null; } if (ContractRepository != null) { ContractRepository.Dispose(); ContractRepository = null; } if (QuotationRepository != null) { QuotationRepository.Dispose(); QuotationRepository = null; } if (AgencyContactRepository != null) { AgencyContactRepository.Dispose(); AgencyContactRepository = null; } if (CruiseRepository != null) { CruiseRepository.Dispose(); CruiseRepository = null; } if (ActivityRepository != null) { ActivityRepository.Dispose(); ActivityRepository = null; } if (AgencyNotesRepository != null) { AgencyNotesRepository.Dispose(); AgencyNotesRepository = null; } if (RoleRepository != null) { RoleRepository.Dispose(); RoleRepository = null; } }
public BookingReportBLL() { BookingRepository = new BookingRepository(); CruiseRepository = new CruiseRepository(); ExpenseRepository = new ExpenseRepository(); AgencyRepository = new AgencyRepository(); UserRepository = new UserRepository(); ExpenseHistoryRepository = new ExpenseHistoryRepository(); CostTypeRepository = new CostTypeRepository(); ExpenseServiceRepository = new ExpenseServiceRepository(); LockingExpenseRepository = new LockingExpenseRepository(); BookingHistoryRepository = new BookingHistoryRepository(); BookingRoomRepository = new BookingRoomRepository(); CustomerRepository = new CustomerRepository(); AgencyNotesRepository = new AgencyNotesRepository(); }
public async Task GivenBookingSource_WhenCruiseIsLocked_ShouldFailToCreate() { var cruiseRepository = new CruiseRepository(); var cruise = await cruiseRepository.GetActiveAsync(); Assert.IsFalse(cruise.IsLocked); cruise.IsLocked = true; await cruiseRepository.UpdateMetadataAsync(cruise); try { await GetNewlyCreatedBookingForTestAsync(cruise, GetBookingRepositoryForTest()); Assert.Fail("Create booking did not throw"); } catch (BookingException) { } }
public async void Insert_Catagories_And_Return_OK() { List <Ships> items = new List <Ships>(); List <Cabintype> cabinType = new List <Cabintype>(); using (StreamReader r = new StreamReader("ships.json")) { items = JsonConvert.DeserializeObject <List <Ships> >(r.ReadToEnd()); } CruiseRepository cruise = new CruiseRepository(); foreach (Ships item in items) { foreach (var itemType in item.cabinTypes) { cabinType.Add(new Cabintype { nid = itemType.nid, company_id = item.company_id, ship_id = item.ship_id, title = itemType.title }); } } bool result = await cruise.InsertCabinTypes(cabinType); Assert.True(result); }
public async void Insert_Ships_And_Return_OK() { List <Ships> items = new List <Ships>(); List <Ship> ships = new List <Ship>(); using (StreamReader r = new StreamReader("ships.json")) { items = JsonConvert.DeserializeObject <List <Ships> >(r.ReadToEnd()); } CruiseRepository cruise = new CruiseRepository(); foreach (Ships item in items) { foreach (var itemType in item.cabinTypes) { ships.Add(new Ship { ship_id = item.ship_id, title = item.title, company_id = item.company_id }); } } bool result = await cruise.InsertShip(ships); Assert.True(result); }
public void Dispose() { if (StoreProcedureRepository != null) { StoreProcedureRepository.Dispose(); StoreProcedureRepository = null; } if (CruiseRepository != null) { CruiseRepository.Dispose(); CruiseRepository = null; } if (BookingRepository != null) { BookingRepository.Dispose(); BookingRepository = null; } if (AgencyRepository != null) { AgencyRepository.Dispose(); AgencyRepository = null; } if (AgencyContactRepository != null) { AgencyContactRepository.Dispose(); AgencyContactRepository = null; } if (ActivityRepository != null) { ActivityRepository.Dispose(); ActivityRepository = null; } if (UserRepository != null) { UserRepository.Dispose(); UserRepository = null; } }
public void Dispose() { if (ActivityRepository != null) { ActivityRepository.Dispose(); ActivityRepository = null; } if (AgencyRepository != null) { AgencyRepository.Dispose(); AgencyRepository = null; } if (AgencyContactRepository != null) { AgencyContactRepository.Dispose(); AgencyContactRepository = null; } if (CruiseRepository != null) { CruiseRepository.Dispose(); CruiseRepository = null; } }
public void Dispose() { if (BookingRepository != null) { BookingRepository.Dispose(); BookingRepository = null; } if (CruiseRepository != null) { CruiseRepository.Dispose(); CruiseRepository = null; } if (TripRepository != null) { TripRepository.Dispose(); TripRepository = null; } if (CustomerRepository != null) { CustomerRepository.Dispose(); CustomerRepository = null; } }
public CruisesController(CruiseRepository cruiseRepository) { _cruiseRepository = cruiseRepository; }
public Cruise CruiseGetById(int cruiseId) { return(CruiseRepository.CruiseGetById(cruiseId)); }
public IEnumerable <Cruise> CruiseGetAll() { return(CruiseRepository.CruiseGetAll()); }
public void Dispose() { if (AgencyRepository != null) { AgencyRepository.Dispose(); AgencyRepository = null; } if (AgencyContactRepository != null) { AgencyContactRepository.Dispose(); AgencyContactRepository = null; } if (SeriesRepository != null) { SeriesRepository.Dispose(); SeriesRepository = null; } if (TripRepository != null) { TripRepository.Dispose(); TripRepository = null; } if (RoomClassRepository != null) { RoomClassRepository.Dispose(); RoomClassRepository = null; } if (RoomTypeRepository != null) { RoomTypeRepository.Dispose(); RoomTypeRepository = null; } if (CruiseRepository != null) { CruiseRepository.Dispose(); CruiseRepository = null; } if (BookingRepository != null) { BookingRepository.Dispose(); BookingRepository = null; } if (BookingRoomRepository != null) { BookingRoomRepository.Dispose(); BookingRoomRepository = null; } if (CustomerRepository != null) { CustomerRepository.Dispose(); CustomerRepository = null; } }
public IList <Cruise> CruiseGetAllByTrip(SailsTrip trip) { return(CruiseRepository.CruiseGetAllByTrip(trip)); }
public ReportingController(CruiseRepository cruiseRepository, ReportingService reportingService, ReportRepository reportRepository) { _cruiseRepository = cruiseRepository; _reportingService = reportingService; _reportRepository = reportRepository; }
public CruiseService(CruiseRepository repo) { _repo = repo; }