コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }