public void CsvDataFromObjectShouldConvertableBackToObject() { var obj = new CsvDataObject(); var csvData = CsvData.FromObject(obj); var backData = csvData.GetObject <CsvDataObject>(); Assert.True(PropertiesEqual(obj, backData)); }
public void CsvDataFromObjectShouldContainAllProperties() { var obj = new CsvDataObject(); var expected = obj.GetType().GetProperties().Length; var csvData = CsvData.FromObject(obj); Assert.Equal(expected, csvData.Columns.Count); Assert.Equal(expected, csvData.Fields.Count); }