Esempio n. 1
0
        public void UpdateAthleteWarnStatusTest()
        {
            // Arrange
            _iAthleteBAL = new AthleteBAL(_iAthleteDAL.Object, _iFitnessTestBAL.Object, _iMapper.Object, _ilogger.Object);

            // Act
            var mockId = 1;
            var result = _iAthleteBAL.UpdateAthleteWarnStatus(mockId);

            // Assert
            Assert.True(result);
        }
        public ActionResult UpdateAthleteWarnStatus(int id)
        {
            _ilogger.LogInformation($"Inside AthleteController, menthod name UpdateAthleteWarnStatus, id = {id}");
            if (id == 0)
            {
                return(Json(data: false));
            }

            if (id > 0)
            {
                var status = _iAthleteBAL.UpdateAthleteWarnStatus(id);
                _ilogger.LogInformation($"UpdateAthleteWarnStatus completed");
                return(Json(data: status));
            }
            return(Json(data: false));
        }