Ejemplo n.º 1
0
        public void CloseAttendance()
        {
            int attendanceId = Repository.Add(new Attendance
            {
                DateTimeLectureStart    = DateTime.Now.AddHours(-1),
                DateTimeLectureEnd      = DateTime.Now.AddHours(1),
                DateTimeAttendanceStart = DateTime.Now.AddHours(-1),
                DateTimeAttendanceEnd   = DateTime.Now.AddHours(1),
                LecturerId = dbContext.Lecturers.FirstOrDefault().Id,
                ModuleId   = dbContext.Modules.FirstOrDefault().Id
            });

            bool result = Repository.Close(attendanceId);

            Assert.IsTrue(result);
        }