public void GetDetailTest() { AttendanceRep res = new AttendanceRep(db); AttendancesController obj = new AttendancesController(res); IActionResult data = obj.Get(1); var okResult = data as OkObjectResult; Assert.AreEqual(200, okResult.StatusCode); }
public void Delete_Valid_Detail() { AttendanceRep res = new AttendanceRep(db); AttendancesController obj = new AttendancesController(res); var data = obj.Delete(1); var okResult = data as OkObjectResult; Assert.AreEqual(200, okResult.StatusCode); }
public void Update_Valid_Detail() { AttendanceRep res = new AttendanceRep(db); AttendancesController obj = new AttendancesController(res); Attendance emp = new Attendance { RollNo = 1, Attendance1 = "32", Result = 96 }; var data = obj.Put(1, emp); var okResult = data as OkObjectResult; Assert.AreEqual(200, okResult.StatusCode); }