public void DeserilizedListContainsData() { PeopleCsvReader pcr = new PeopleCsvReader(); var p = pcr.Convert <Person>(Environment.CurrentDirectory + "\\Data\\sample.csv"); Assert.NotEmpty(p); }
public void DeserilizedListValidation(int id, string fname, string lname, int parentId) { PeopleCsvReader pcr = new PeopleCsvReader(); var p = pcr.Convert <Person>(Environment.CurrentDirectory + "\\Data\\sample.csv"); Assert.Equal(fname, p.ElementAt(id - 1).FirstName); Assert.Equal(lname, p.ElementAt(id - 1).LastName); Assert.Equal(id, p.ElementAt(id - 1).Id); Assert.Equal(parentId, p.ElementAt(id - 1).ParentId); }