/// <summary> /// /// </summary> /// <returns></returns> private bool ReadData() { bool blnResult = false; long row = this._Test.Row; for (long col = PROCESS_COLUMNS.Data; col <= this._WB.shtTestcases.ColMax; col++) { if (!string.IsNullOrWhiteSpace(this._WB.shtTestcases.Values[row, col])) { ExcelData exceldata = new ExcelData(); exceldata.Name = this._WB.shtTestcases.Values[PROCESS_ROWS.Header, col]; exceldata.Value = this._WB.shtTestcases.Values[row, col]; exceldata.Column = col; this._Test.Data.Add(exceldata); } } return blnResult; }
/// <summary> /// /// </summary> /// <returns></returns> private bool ReadTestCases() { bool blnResult = true; for (long row = PROCESS_ROWS.Testcase; row <= shtTestcases.RowMax; row++) { if (!string.IsNullOrEmpty(shtTestcases.Values[row,PROCESS_COLUMNS.ID])) { ExcelTest exceltest = new ExcelTest(); exceltest.ID = shtTestcases.Values[row, PROCESS_COLUMNS.ID]; exceltest.Description = shtTestcases.Values[row, PROCESS_COLUMNS.Description]; exceltest.ExpectedResult = shtTestcases.Values[row, PROCESS_COLUMNS.ExpectedResult]; exceltest.ResourceID = shtTestcases.Values[row, PROCESS_COLUMNS.RepositoryID]; exceltest.Flow = DetermineBasicFlow(shtTestcases.Values[row, PROCESS_COLUMNS.Flow]); for (long col = PROCESS_COLUMNS.Data; col <= shtTestcases.ColMax; col++) { if (!string.IsNullOrEmpty(shtTestcases.Values[row, col])) { ExcelData data = new ExcelData(); data.Name = shtTestcases.Values[PROCESS_ROWS.Header,col]; data.Value = shtTestcases.Values[row,col]; exceltest.Data.Add(data); } } exceltest.Row = row; this.TestCases.Add(exceltest); } } return blnResult; }