public void File3Creates4Rows() { ICsvLoader loader = new CsvLoader(); using (FileStream fs = File.OpenRead(file3)) { IEnumerable <Module> results = loader.ReadFromStream(fs); Assert.AreEqual(2, results.Count()); } }
public void iarchIsVerplichtVoorAlleSpecialisaties() { ICsvLoader loader = new CsvLoader(); using (FileStream fs = File.OpenRead(file1)) { IEnumerable <Module> results = loader.ReadFromStream(fs); Assert.IsTrue(results.Any(m => m.ModuleCode == "iarch")); var verplichtVoor = results.Where(m => m.ModuleCode == "iarch").First().VerplichtVoor; Assert.IsTrue(verplichtVoor.Any(m => m.Code == "SE")); Assert.IsTrue(verplichtVoor.Any(m => m.Code == "FICT")); Assert.IsTrue(verplichtVoor.Any(m => m.Code == "BDAM")); Assert.IsTrue(verplichtVoor.Any(m => m.Code == "IAT")); } }
public void All7RowsHaveCorrectNames() { ICsvLoader loader = new CsvLoader(); using (FileStream fs = File.OpenRead(file1)) { IEnumerable <Module> results = loader.ReadFromStream(fs); Assert.IsTrue(results.Any(m => m.ModuleCode == "iarch")); Assert.IsTrue(results.Any(m => m.ModuleCode == "ibdw")); Assert.IsTrue(results.Any(m => m.ModuleCode == "ibk5")); Assert.IsTrue(results.Any(m => m.ModuleCode == "icomas")); Assert.IsTrue(results.Any(m => m.ModuleCode == "icommha")); Assert.IsTrue(results.Any(m => m.ModuleCode == "icommpr")); Assert.IsTrue(results.Any(m => m.ModuleCode == "icpt")); } }