Ejemplo n.º 1
0
        public void ReadGroup()
        {
            CreateGroup();
            var group = _dao.Read(groupData.Id);

            Assert.IsNotNull(group);
            Assert.AreEqual(groupData.Id, group.Id);
        }
Ejemplo n.º 2
0
        public void TestRead()
        {
            GroupDao groupDao      = factory.GetGroupDao();
            Group    group         = groupDao.Read(1);
            Group    expectedGroup = new Group("ИТ-11", 1);

            Assert.AreEqual(expectedGroup, group);
        }
Ejemplo n.º 3
0
        public void TestUpdate()
        {
            GroupDao groupDao = factory.GetGroupDao();

            groupDao.Update(new Group("ИТ-21", 1), 3);
            Group group         = groupDao.Read(3);
            Group expectedGroup = new Group("ИТ-21", 1);

            Assert.AreEqual(expectedGroup, group);
        }
Ejemplo n.º 4
0
        public void OutputTest()
        {
            var student = new StudentDao();
            var session = new SessionDao();
            var group   = new GroupDao();
            var report  = new Report();
            var ex      = new ExcelIO();

            ex.Output(report.GetResultsByStudent(session.Read(1), group.Read(2)), @"C:\Users\lenni\source\repos\ZimnitskiYury\epam_gstu\task6\output.xlsx");
            ex.Output(report.GetGrades(session.Read(1)), @"C:\Users\lenni\source\repos\ZimnitskiYury\epam_gstu\task6\output2.xlsx");
            ex.Output(report.GetSessionExpelledByStudent(session.Read(1), 50), @"C:\Users\lenni\source\repos\ZimnitskiYury\epam_gstu\task6\output3.xlsx");
            Assert.Fail();
        }