public BaggageManagementPresenter( IBaggageManagementView view, IBaggageServices baggageServices, IBookingsServices bookingsServices) : base(view) { if (baggageServices == null) { throw new ArgumentNullException(nameof(IBaggageServices)); } if (bookingsServices == null) { throw new ArgumentNullException(nameof(IBookingsServices)); } this.baggageServices = baggageServices; this.bookingsServices = bookingsServices; this.View.OnBaggageGetData += this.View_OnBaggageGetData; this.View.OnBaggageUpdateItem += this.View_OnBaggageUpdateItem; this.View.OnBaggageDeleteItem += this.View_OnBaggageDeleteItem; this.View.OnBaggageAddItem += this.View_OnBaggageAddItem; this.View.OnBookingsGetData += this.View_OnBookingsGetData; }
public void TestInitialize() { this.baggageRepository = TestObjectFactoryRepositories.GetBaggageRepository(); this.baggageServices = new BaggageServices(this.baggageRepository); this.bag = new Baggage() { Type = BaggageType.Cabin, Price = 1m, BookingId = 1 }; }