コード例 #1
0
        public void ScreenData(string filename)
        {
            string ExcelLocation   = filename;
            int    ExcelPageNumber = 1;

            var tcList    = new List <ExcelModel>(); // Data which we really want to use in this test
            var excelData = _excelManager.Read(ExcelLocation, ExcelPageNumber);

            _excelHelper.HandleEmptyAndNullData(excelData, ExcelHelperRule.CUCUMBER);
            _excelConverter.MapTestcase(excelData, tcList);

            for (var i = 0; i < tcList.Count; i++)
            {
                _testcase.Add(tcList[i].TestcaseNumber);
                _hotelid.Add(tcList[i].HotelID);
                _checkin.Add(tcList[i].CheckIn);
                _los.Add(tcList[i].Los);
                _rateplan.Add(tcList[i].RatePlan);
                _adult.Add(tcList[i].Adult);
                _children.Add(tcList[i].Children);
                _childage.Add(tcList[i].ChildAge);
                _room.Add(tcList[i].Rooms);
                _isallocc.Add(tcList[i].IsAllOcc);
                _allownocc.Add(tcList[i].AllowOverideOcc);
                _hotelid2.Add(tcList[i].HotelID2);
                _roomid.Add(tcList[i].RoomID);
                _channel.Add(tcList[i].Channel);
                _currency.Add(tcList[i].Currency);
                _rateplan2.Add(tcList[i].RatePlan2);
                _occupancy.Add(tcList[i].Occupancy);
                _maxextrabed.Add(tcList[i].MaxExtraBed);
                _isfit.Add(tcList[i].IsFit);
                _extrabed.Add(tcList[i].ExtraBad);
                _sellex.Add(tcList[i].SellEx);

                //breakdown task
                _date.Add(tcList[i].Date);
                _type.Add(tcList[i].Type);
                _option.Add(tcList[i].Option);
                _quantity.Add(tcList[i].Quantity);
                _sellex2.Add(tcList[i].SellEx2);
                _type2.Add(tcList[i].Type2);
                _option2.Add(tcList[i].Option2);
                _quantity2.Add(tcList[i].Quantity2);
                _sellex3.Add(tcList[i].SellEx3);
            }
        }