public static SearchHotelModel SearchHotelModel(string destination, int rooms, int adults) { var _model = InitializeTestingModel.SearchHotelModel(destination); _model.NoOfAdult = adults; _model.NoOfRoom = rooms; return(_model); }
//[TestMethod] public void GetRoomAvailability() { var searchHotelModel = InitializeTestingModel.SearchHotelModel("Kuala Lumpur, Malaysia"); //searchHotelModel.RType = Alphareds.Module.ESBHotelComparisonWebService.ESBHotel.RateType.ConcertPackage; searchHotelModel.Result = ESBHotelServiceCall.GetHotelList(searchHotelModel); var roomModel = InitializeTestingModel.SearchRoomHotel(searchHotelModel, searchHotelModel.Result.HotelList[0].hotelId); //var res = ESBHotelServiceCall.GetRoomAvailability(roomModel, searchHotelModel); var res2 = ESBHotelServiceCall.GetRoomAvailability(roomModel, searchHotelModel); }
public static SearchHotelModel SearchHotelModel(string destination, int rooms, int adults, int childs, List <int> childAge) { var _model = InitializeTestingModel.SearchHotelModel(destination); _model.NoOfAdult = adults; _model.NoOfRoom = rooms; _model.NoOfInfant = childs; _model.NoOfChildAge = childAge; if (childAge?.Count < childs) { throw new Exception("Child age doesn't properly assigned."); } return(_model); }