private static DataRow GetFirstValidRow() { var firstDataRow = new DataRow(); firstDataRow.Values.Add("long"); firstDataRow.Values.Add("square"); firstDataRow.Values.Add("waffle"); return firstDataRow; }
private void EvalInputFrom(TextReader reader, EntityData entity) { string line; while ((line = reader.ReadLine()) != null) { if (line.StartsWith("//")) continue; if (line.Equals("")) continue; var values = SplitInput(line); if (values.Length != entity.Attributes.Count) { var exceptionMessage = String.Format("Read {0} data\nLast line read: {1}\nExpecting {2} attributes", values.Length, line, entity.Attributes.Count); throw new DataTransformationException(exceptionMessage); } var dataRow = new DataRow(); for (var attributeId = 0; attributeId < entity.Attributes.Count; attributeId++) dataRow.Values.Add(values[attributeId]); entity.Data.Add(dataRow); } }
private static DataRow GetSecondValidDataRow() { var secondDataRow = new DataRow(); secondDataRow.Values.Add("long"); secondDataRow.Values.Add("rectangle"); secondDataRow.Values.Add("waffle"); return secondDataRow; }
private static DataRow GetFourthValidDataRow() { var fourthDataRow = new DataRow(); fourthDataRow.Values.Add("short"); fourthDataRow.Values.Add("rectangle"); fourthDataRow.Values.Add("one-way"); return fourthDataRow; }
private static DataRow GetThirdValidDataRowWithMissingValue() { var thirdDataRow = new DataRow(); thirdDataRow.Values.Add("short"); thirdDataRow.Values.Add(""); thirdDataRow.Values.Add("two-way"); return thirdDataRow; }
private static DataRow GetThirdValidDataRow() { var thirdDataRow = new DataRow(); thirdDataRow.Values.Add("short"); thirdDataRow.Values.Add("square"); thirdDataRow.Values.Add("two-way"); return thirdDataRow; }
private static DataRow GetThirdInValidDataRow() { var thirdDataRow = new DataRow(); thirdDataRow.Values.Add("short"); thirdDataRow.Values.Add("square"); thirdDataRow.Values.Add("two-way"); thirdDataRow.Values.Add("additional invald data"); return thirdDataRow; }