public void Initialize(Person person) { var info = new FileInfo(person.DataFilePath); int idx = info.Name.IndexOf(ConfigurationManager.AppSettings["nhanesPeronDataFileSuffix"]); person.Id = info.Name.Remove(idx); INhanesCsvParser parser = new NhanesCsvParser(); var records = parser.ParseCsv(person.DataFilePath); person.NhanesRecords = records; }
public void ParseCsvTest() { var time = TimeAction(() => { INhanesCsvParser parser = new NhanesCsvParser(); var records = parser.ParseCsv(file); Assert.IsNotNull(records); Assert.AreEqual(1000000, records.Count()); }); Trace.WriteLine("Time: " + time); }