public void ConvertRowWithTooManyColumns() { var configuration = DataStoreConfiguration.FromColumns("First Name", "Last Name", "Age"); var store = new CommaSeperatedFileDataStore(configuration); var row = store.NewRow("John", "Doe", "23"); store.Configuration.Columns.Add(new DataStoreColumn { Name = "Birthday" }); TestHelper.ExpectedException<ArgumentException>(() => store.ConvertRow(row), "The row does not match the column count."); }
public void ConvertRowWithPlainText() { var configuration = DataStoreConfiguration.FromColumns("First Name", "Last Name", "Age"); var store = new CommaSeperatedFileDataStore(configuration); var row = store.NewRow("John", "Doe", "23"); var expected = "John,Doe,23"; var actual = store.ConvertRow(row); TestHelper.AreEqual(expected, actual); }