public void TestConfrenceSchedule() { var files = Directory.EnumerateFiles("input", "*.txt", SearchOption.TopDirectoryOnly); Confrence confrence = null; foreach (var file in files) { confrence = new Confrence(file, DateTime.Now); int index = 0; for (int i = 0; i < confrence.TotalTracks; i++) { index = confrence.ScheduleTalks(index, i); } ValidateTalk(confrence.ScheduledTalks); } }
public void ReadFileTest() { var files = Directory.EnumerateFiles("input", "*.txt", SearchOption.TopDirectoryOnly); Confrence confrence = null; foreach (var file in files) { confrence = new Confrence(file, DateTime.Now); string content = string.Empty; using (StreamReader sr = new StreamReader(file)) { content = sr.ReadToEnd(); } string[] lines = content.Split('\n'); Assert.AreEqual(lines.Length, confrence.Talks.Count); } }