Exemplo n.º 1
0
        public async Task TesCreateOneAttendanceSuccessfully()
        {
            //Arrange
            var listToUpdate = new List <AttendanceReports>();

            listToUpdate.Add(new AttendanceReports()
            {
                AttendanceId = 1, Status = "future", TimeTableId = 1, UserId = "2"
            });

            //Act
            var result = await attendanceDAO.CreateAttendance(listToUpdate);

            //Assert
            Assert.Equal((int)HttpStatusCode.OK, ((ObjectResult)result).StatusCode);
            Assert.Single(context.AttendanceReports.ToList());
        }