Ejemplo n.º 1
0
        public void Remove_ClinicCouldNotFound_Fail(int id)
        {
            // arrange
            var response = new Response <bool>()
            {
                IsSucceed    = false,
                ErrorMessage = "Clinic could not found",
                Result       = false
            };

            _unitOfWork.Setup(x => x.ClinicRepository.GetById(It.IsAny <int>())).Returns((Clinic)null);

            // act
            var result = _clinicService.Remove(id);

            // assert
            Assert.IsFalse(result.IsSucceed);
            Assert.IsFalse(result.Result);
            Assert.AreEqual(response.ErrorMessage, result.ErrorMessage);
        }