public async Task TestGetAttendanceByScheduleSuccessfully() { //Arrange var listToGet = new List <AttendanceReports>(); AttendanceReports attendance = new AttendanceReports() { AttendanceId = 1, Status = "future", TimeTableId = 1, UserId = "1" }; AttendanceReports attendance1 = new AttendanceReports() { AttendanceId = 2, Status = "future", TimeTableId = 1, UserId = "2" }; listToGet.Add(attendance); listToGet.Add(attendance1); await context.AttendanceReports.AddRangeAsync(listToGet); await context.SaveChangesAsync(); //Act var result = attendanceDAO.GetAttendanceBySchedule(1); //Assert Assert.Equal(listToGet, result); }