public void UpdateImageUrlById_AnyCallIds_AnyUrl_True()
        {
            // Setup dependence
            var settingMock = new Mock<ISettings>();
            var componentMock = new Mock<IComponents>();
            var repositoryMock = new Mock<IRepository>();
            var serviceLocatorMock = new Mock<IServiceLocator>();
            var uowMock = new Mock<IUnitOfWork>();

            serviceLocatorMock.Setup(r => r.GetInstance<IRepository>())
                .Returns(repositoryMock.Object);
            serviceLocatorMock.Setup(r => r.GetInstance<IUnitOfWork>())
                .Returns(uowMock.Object);
            ServiceLocator.SetLocatorProvider(() => serviceLocatorMock.Object);

            // Arrange data
            Guid id = Guid.NewGuid();
            string imageUrl = "feedback";
            bool expectedResult = true;

            Call call = new Call
            {
                Id = id
            };
            repositoryMock.Setup(r => r.FindById<Call>(id)).Returns(call);
            repositoryMock.Setup(r => r.CreateUnitOfWork()).Returns(uowMock.Object);

            // Act
            CallService callService = new CallService(uowMock.Object, repositoryMock.Object, settingMock.Object, componentMock.Object);
            bool currentResult = callService.UpdateImageUrlById(id, imageUrl);

            // Assert
            repositoryMock.Verify(r => r.FindById<Call>(id));
            repositoryMock.Verify(r => r.Update<Call>(It.Is<Call>(
                c => c.ImageUrl.Equals(imageUrl))));
            uowMock.Verify(u => u.Save());
            Assert.AreEqual(expectedResult, currentResult);
        }
        public void UpdateImageUrlById_AnyCallIds_AnyUrl_False()
        {
            // Setup dependence
            var settingMock = new Mock<ISettings>();
            var componentMock = new Mock<IComponents>();
            var repositoryMock = new Mock<IRepository>();
            var uowMock = new Mock<IUnitOfWork>();
            var serviceLocatorMock = new Mock<IServiceLocator>();

            serviceLocatorMock.Setup(r => r.GetInstance<IRepository>())
                .Returns(repositoryMock.Object);
            ServiceLocator.SetLocatorProvider(() => serviceLocatorMock.Object);

            // Arrange data
            Guid id = Guid.NewGuid();
            string imageUrl = "feedback";
            bool expectedResult = false;

            // Act
            CallService callService = new CallService(uowMock.Object, repositoryMock.Object, settingMock.Object, componentMock.Object);
            bool currentResult = callService.UpdateImageUrlById(id, imageUrl);

            // Assert
            Assert.AreEqual(expectedResult, currentResult);
        }