Exemple #1
0
        public void File3Creates4Rows()
        {
            ICsvLoader loader = new CsvLoader();

            using (FileStream fs = File.OpenRead(file3))
            {
                IEnumerable <Module> results = loader.ReadFromStream(fs);
                Assert.AreEqual(2, results.Count());
            }
        }
Exemple #2
0
        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"));
            }
        }
Exemple #3
0
        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"));
            }
        }