private static void ImportTableCsvFile() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); //pre define columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age"), new DynamicTableColumn<string>("Street") }); //import using (StreamReader reader = new StreamReader("test.csv")) { table.FromCsv(ReadFile(reader)); } foreach (dynamic actualRow in table.Rows) { Console.WriteLine( string.Format("{0} {1} is {2} years old.", actualRow.FirstName, actualRow.LastName, actualRow.Age)); } }
public void UseTable_PreDefinedColumns_WellFormet() { IDynamicTable table = new DynamicTable(DynamicTableType.WellFormed); dynamic row; //set columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", 100) }); //add values row = new ExpandoObject(); row.FirstName = "Hans"; row.LastName = "Mueller"; row.Age = 30; table.AddRow(row); row = new ExpandoObject(); row.FirstName = "Sarah"; row.LastName = "Meier"; row.Age = 50; table.AddRow(row); //compare Assert.AreEqual(2, table.Rows.Count); Assert.AreEqual(3, table.Columns.Count); row = table.Rows[0]; Assert.AreEqual("Hans", row.FirstName); Assert.AreEqual("Mueller", row.LastName); Assert.AreEqual(30, row.Age); row = table.Rows[1]; Assert.AreEqual("Sarah", row.FirstName); Assert.AreEqual("Meier", row.LastName); Assert.AreEqual(50, row.Age); }
public void FromCsv_WrongColumnNames() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); List<string> csvContent = new List<string>() { "FirstName,Abc,Age,Street", "\"Hans\",\"Mueller\",30,\"\"", "\"\",\"Meier\",0,\"Main street\"" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import try { table.FromCsv(csvContent, true, ',', true); Assert.Fail(); } catch (FormatException) { } }
public void FromCsv_Standard() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); dynamic row; List<string> csvContent = new List<string>() { "\"Hans\",\"Mueller\",30,\"\"", "\"\",\"Meier\",0,\"Main street\"" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import table.FromCsv(csvContent); //compare Assert.AreEqual(2, table.Rows.Count); row = table.Rows[0]; Assert.AreEqual("Hans", row.FirstName); Assert.AreEqual("Mueller", row.LastName); Assert.AreEqual(30, row.Age); Assert.AreEqual("", row.Street); row = table.Rows[1]; Assert.AreEqual("", row.FirstName); Assert.AreEqual("Meier", row.LastName); Assert.AreEqual(0, row.Age); Assert.AreEqual("Main street", row.Street); }
public void FromCsv_Null() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); List<string> csvContent = new List<string>(); //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import table.FromCsv(null); //compare Assert.AreEqual(0, table.Rows.Count); }
public void AsXml_Empty() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); string csvContent; string expectedContent; //set columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName", ""), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1) }); //get csv csvContent = table.AsXml(); //compare expectedContent = "<DynamicTable>" + Environment.NewLine + " <Rows />" + Environment.NewLine + "</DynamicTable>"; Assert.AreEqual(expectedContent, csvContent); }
public void AsDataTable_Empty() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); DataTable dataTable; //set columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName", ""), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1) }); //get csv dataTable = table.AsDataTable(); //compare Assert.AreEqual(3, dataTable.Columns.Count); Assert.AreEqual("FirstName", dataTable.Columns[0].ColumnName); Assert.AreEqual("LastName", dataTable.Columns[1].ColumnName); Assert.AreEqual("Age", dataTable.Columns[2].ColumnName); Assert.AreEqual("System.String", dataTable.Columns[0].DataType.ToString()); Assert.AreEqual("System.String", dataTable.Columns[1].DataType.ToString()); Assert.AreEqual(0, dataTable.Rows.Count); }
public void PreDefineColumns_Null() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); //set columns try { table.PreDefineColumns(null); Assert.Fail(); } catch (ArgumentNullException) { } }
public void FromDataTable_WrongType() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<int>("LastName"), new DynamicTableColumn<int>("Age"), new DynamicTableColumn<DateTime>("Birthday"), }); //import try { table.FromDataTable(CreateSimpleTestData()); Assert.Fail(); } catch (ArgumentException) { } //compare Assert.AreEqual(0, table.Rows.Count); }
public void FromDataTable_WrongNumberOfColumns_Expandable() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); dynamic row; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age"), }); //import table.FromDataTable(CreateSimpleTestData()); //compare Assert.AreEqual(2, table.Rows.Count); row = table.Rows[0]; Assert.AreEqual("Hans", row.FirstName); Assert.AreEqual("Mueller", row.LastName); Assert.AreEqual(30, row.Age); Assert.AreEqual(new DateTime(2001, 12, 20), row.Birthday); row = table.Rows[1]; Assert.AreEqual(null, row.FirstName); Assert.AreEqual("Meier", row.LastName); Assert.AreEqual(0, row.Age); Assert.AreEqual(new DateTime(0), row.Birthday); }
public void FromDataTable_WrongColumnNames_WellFormed() { IDynamicTable table = new DynamicTable(DynamicTableType.WellFormed); //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastNameeeeee"), new DynamicTableColumn<int>("Age"), new DynamicTableColumn<DateTime>("Birthday"), }); //import try { table.FromDataTable(CreateSimpleTestData()); Assert.Fail(); } catch (ArgumentException) { } }
public void FromDataTable_Empty_NoRows_PreDefinedTable() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); DataTable data; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<DateTime>("Birthday"), }); //prepare data data = CreateSimpleTestData(); data.Rows.Clear(); //import table.FromDataTable(data); //compare Assert.AreEqual(0, table.Rows.Count); }
public void FromDataTable_Empty_NoColumns() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<DateTime>("Birthday"), }); //import table.FromDataTable(new DataTable()); //compare Assert.AreEqual(0, table.Rows.Count); }
public void FromDataTable_AlreadyContainsRows() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<DateTime>("Birthday"), }); //import table.FromDataTable(CreateSimpleTestData()); //compare Assert.AreEqual(2, table.Rows.Count); //import again try { table.FromDataTable(CreateSimpleTestData()); Assert.Fail(); } catch (NotSupportedException) { } }
public void AsCsv_Empty_WithoutHeaders() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); string csvContent; //set columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName", ""), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1) }); //get csv csvContent = table.AsCsv(false, ',', false); //compare Assert.AreEqual("", csvContent); }
public void FromXml_AlreadyContainsRows() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); List<string> xmlContent = new List<string>() { "<DynamicTable>" + Environment.NewLine, " <Rows>" + Environment.NewLine, " <Row>" + Environment.NewLine, " <FirstName value=\"Hans\" />" + Environment.NewLine, " <LastName value=\"Mueller\" />" + Environment.NewLine, " <Age value=\"30\" />" + Environment.NewLine, " <Street value=\"\" />" + Environment.NewLine, " </Row>" + Environment.NewLine, " <Row>" + Environment.NewLine, " <FirstName value=\"\" />" + Environment.NewLine, " <LastName value=\"Meier\" />" + Environment.NewLine, " <Age value=\"0\" />" + Environment.NewLine, " <Street value=\"Main street\" />" + Environment.NewLine, " </Row>" + Environment.NewLine, " </Rows>" + Environment.NewLine, "</DynamicTable>" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import table.FromXml(xmlContent); //compare Assert.AreEqual(2, table.Rows.Count); //import again try { table.FromXml(xmlContent); Assert.Fail(); } catch (NotSupportedException) { } }
public void PreDefineColumns_Error_NameNull() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); //set columns try { table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>(null, ""), new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<int>("Age", -1) }); Assert.Fail(); } catch (ArgumentException) { } }
public void FromXml_Standard() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); dynamic row; List<string> xmlContent = new List<string>() { "<DynamicTable>" + Environment.NewLine, " <Rows>" + Environment.NewLine, " <Row>" + Environment.NewLine, " <FirstName value=\"Hans\" />" + Environment.NewLine, " <LastName value=\"Mueller\" />" + Environment.NewLine, " <Age value=\"30\" />" + Environment.NewLine, " <Street value=\"\" />" + Environment.NewLine, " </Row>" + Environment.NewLine, " <Row>" + Environment.NewLine, " <FirstName value=\"\" />" + Environment.NewLine, " <LastName value=\"Meier\" />" + Environment.NewLine, " <Age value=\"0\" />" + Environment.NewLine, " <Street value=\"Main street\" />" + Environment.NewLine, " </Row>" + Environment.NewLine, " </Rows>" + Environment.NewLine, "</DynamicTable>" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age"), new DynamicTableColumn<string>("Street"), }); //import table.FromXml(xmlContent); //compare Assert.AreEqual(2, table.Rows.Count); row = table.Rows[0]; Assert.AreEqual("Hans", row.FirstName); Assert.AreEqual("Mueller", row.LastName); Assert.AreEqual(30, row.Age); Assert.AreEqual("", row.Street); row = table.Rows[1]; Assert.AreEqual("", row.FirstName); Assert.AreEqual("Meier", row.LastName); Assert.AreEqual(0, row.Age); Assert.AreEqual("Main street", row.Street); }
public void PreDefineColumns_Standard() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); //set columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName", ""), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1) }); //compare Assert.AreEqual(3, table.Columns.Count); Assert.AreEqual("FirstName", table.Columns[0].Name); Assert.AreEqual("", table.Columns[0].DefaultValue); Assert.AreEqual("LastName", table.Columns[1].Name); Assert.AreEqual(null, table.Columns[1].DefaultValue); Assert.AreEqual("Age", table.Columns[2].Name); Assert.AreEqual(-1, table.Columns[2].DefaultValue); }
public void FromXml_WrongContentFormat() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); List<string> xmlContent = new List<string>() { "<DynamicTable>" + Environment.NewLine, " <Rowsssssssssss>" + Environment.NewLine, " <Rowwwww>" + Environment.NewLine, " <FirstName value=\"Hans\" />" + Environment.NewLine, " <LastName value=\"Mueller\" />" + Environment.NewLine, " <Age value=\"30\" />" + Environment.NewLine, " <Street value=\"\" />" + Environment.NewLine, " </Rowwwww>" + Environment.NewLine, " <Rowwwww>" + Environment.NewLine, " <FirstName value=\"\" />" + Environment.NewLine, " <LastName value=\"Meier\" />" + Environment.NewLine, " <Age value=\"0\" />" + Environment.NewLine, " <Street value=\"Main street\" />" + Environment.NewLine, " </Rowwwww>" + Environment.NewLine, " </Rowsssssssssss>" + Environment.NewLine, "</DynamicTable>" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import table.FromXml(xmlContent); //compare Assert.AreEqual(0, table.Rows.Count); }
public void AsDataTable_Standard_PreDefineColumns() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); dynamic row; DataTable dataTable; //set columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName", ""), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1) }); //add values row = new ExpandoObject(); row.FirstName = "Hans"; row.LastName = "Mueller"; row.Age = 30; table.AddRow(row); row = new ExpandoObject(); row.LastName = "Meier"; table.AddRow(row); //get data table dataTable = table.AsDataTable(); //compare Assert.AreEqual(3, dataTable.Columns.Count); Assert.AreEqual("FirstName", dataTable.Columns[0].ColumnName); Assert.AreEqual("LastName", dataTable.Columns[1].ColumnName); Assert.AreEqual("Age", dataTable.Columns[2].ColumnName); Assert.AreEqual("System.String", dataTable.Columns[0].DataType.ToString()); Assert.AreEqual("System.String", dataTable.Columns[1].DataType.ToString()); Assert.AreEqual("System.Int32", dataTable.Columns[2].DataType.ToString()); Assert.AreEqual(2, dataTable.Rows.Count); Assert.AreEqual("Hans", dataTable.Rows[0].ItemArray[0]); Assert.AreEqual("Mueller", dataTable.Rows[0].ItemArray[1]); Assert.AreEqual(30, dataTable.Rows[0].ItemArray[2]); Assert.AreEqual("", dataTable.Rows[1].ItemArray[0]); Assert.AreEqual("Meier", dataTable.Rows[1].ItemArray[1]); Assert.AreEqual(-1, dataTable.Rows[1].ItemArray[2]); }
public void AsCsv_Empty_WithHeaders() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); string csvContent; string expectedContent; //set columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName", ""), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1) }); //get csv csvContent = table.AsCsv(true, ',', false); //compare expectedContent = "FirstName,LastName,Age" + Environment.NewLine; Assert.AreEqual(expectedContent, csvContent); }
public void FromCsv_AlreadyContainsRows() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); List<string> csvContent = new List<string>() { "\"Hans\",\"Mueller\",30,\"\"", "\"\",\"Meier\",0,\"Main street\"" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import table.FromCsv(csvContent); //compare Assert.AreEqual(2, table.Rows.Count); //import again try { table.FromCsv(csvContent); Assert.Fail(); } catch (NotSupportedException) { } }
public void FromXml_WrongXMLFormat() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); List<string> xmlContent = new List<string>() { "<DynamicTable>" + Environment.NewLine, " <Rows>" + Environment.NewLine, " <Row>" + Environment.NewLine, " <FirstName value=\"Hans\" />" + Environment.NewLine, " <LastName value=\"Mueller\" />" + Environment.NewLine, " <Age value=\"30\" />" + Environment.NewLine, " <Street value=\"\" />" + Environment.NewLine, " </Row>" + Environment.NewLine, " <Row>" + Environment.NewLine, " <FirstName value=\"\" />" + Environment.NewLine, " <LastName value=\"Meier\" />" + Environment.NewLine, " <Age value=\"0\" />" + Environment.NewLine, " <Street value=\"Main street\" />" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import try { table.FromXml(xmlContent); Assert.Fail(); } catch (XmlException) { } }
public void FromCsv_Semicolon_WithoutHeaders_WithoutQuotes() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); dynamic row; List<string> csvContent = new List<string>() { "Hans;Mueller;30;", ";Meier;0;Main street" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import table.FromCsv(csvContent, false, ';', false); //compare Assert.AreEqual(2, table.Rows.Count); row = table.Rows[0]; Assert.AreEqual("Hans", row.FirstName); Assert.AreEqual("Mueller", row.LastName); Assert.AreEqual(30, row.Age); Assert.AreEqual("", row.Street); row = table.Rows[1]; Assert.AreEqual("", row.FirstName); Assert.AreEqual("Meier", row.LastName); Assert.AreEqual(0, row.Age); Assert.AreEqual("Main street", row.Street); }
public void PreDefineColumns_AlreadyDefined() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); //set columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName", ""), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1) }); //compare Assert.AreEqual(3, table.Columns.Count); //set columns again try { table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName", ""), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1) }); Assert.Fail(); } catch (NotSupportedException) { } }
public void FromCsv_WithHeaders_OtherSortOrderInFile() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); dynamic row; List<string> csvContent = new List<string>() { "Street,FirstName,Age,LastName", ",Hans,30,Mueller", "Main street,,0,Meier" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import table.FromCsv(csvContent, true, ',', false); //compare Assert.AreEqual(2, table.Rows.Count); row = table.Rows[0]; Assert.AreEqual("Hans", row.FirstName); Assert.AreEqual("Mueller", row.LastName); Assert.AreEqual(30, row.Age); Assert.AreEqual("", row.Street); row = table.Rows[1]; Assert.AreEqual("", row.FirstName); Assert.AreEqual("Meier", row.LastName); Assert.AreEqual(0, row.Age); Assert.AreEqual("Main street", row.Street); }
public void PreDefineColumns_Empty() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); //set columns try { table.PreDefineColumns(new List<IDynamicTableColumn>()); Assert.Fail(); } catch (ArgumentException) { } }
public void FromCsv_WrongNumberOfElements() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); List<string> csvContent = new List<string>() { "\"Hans\",\"Mueller\",30,\"\"", "\"\",\"Meier\",0" }; //columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName"), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1), new DynamicTableColumn<string>("Street"), }); //import try { table.FromCsv(csvContent); Assert.Fail(); } catch (FormatException) { } //compare Assert.AreEqual(0, table.Rows.Count); }
public void UseTable_PreDefinedColumns_Expandeable() { IDynamicTable table = new DynamicTable(DynamicTableType.Expandable); dynamic row; //set columns table.PreDefineColumns( new List<IDynamicTableColumn>() { new DynamicTableColumn<string>("FirstName", ""), new DynamicTableColumn<string>("LastName"), new DynamicTableColumn<int>("Age", -1) }); //add values row = new ExpandoObject(); row.FirstName = "Hans"; row.LastName = "Mueller"; row.Age = 30; table.AddRow(row); row = new ExpandoObject(); row.LastName = "Meier"; row.Street = "Main street"; table.AddRow(row); //compare Assert.AreEqual(2, table.Rows.Count); Assert.AreEqual(4, table.Columns.Count); row = table.Rows[0]; Assert.AreEqual("Hans", row.FirstName); Assert.AreEqual("Mueller", row.LastName); Assert.AreEqual(30, row.Age); Assert.AreEqual(null, row.Street); row = table.Rows[1]; Assert.AreEqual("", row.FirstName); Assert.AreEqual("Meier", row.LastName); Assert.AreEqual(-1, row.Age); Assert.AreEqual("Main street", row.Street); }