public async Task ReturnFalse_WhenTwitterAccountRepositoryDeleteMetodReturnsFalse()
        {
            //Arrange
            var unitOfWorkMock               = new Mock <IUnitOfWork>();
            var mappingProviderMock          = new Mock <IMappingProvider>();
            var userRepositoryMock           = new Mock <IUserRepository>();
            var twitterAccountRepositoryMock = new Mock <ITwitterAccountRepository>();

            var userId           = "30";
            var twitterAccountId = "1905";

            twitterAccountRepositoryMock
            .Setup(x => x.UserTwitterAccountIsDeleted(userId, twitterAccountId))
            .ReturnsAsync(false);

            var twitterAccountService = new TwitterAccountService(
                unitOfWorkMock.Object,
                mappingProviderMock.Object,
                userRepositoryMock.Object,
                twitterAccountRepositoryMock.Object);

            //Act
            var userIsDeleted = await twitterAccountService.DeleteTwitterAccountFromUser(userId, twitterAccountId);

            //Assert
            Assert.IsFalse(userIsDeleted);
        }
        public async Task ReturnTrue_WhenInvokedWithValidParameters()
        {
            //Arrange
            var unitOfWorkMock               = new Mock <IUnitOfWork>();
            var mappingProviderMock          = new Mock <IMappingProvider>();
            var userRepositoryMock           = new Mock <IUserRepository>();
            var twitterAccountRepositoryMock = new Mock <ITwitterAccountRepository>();

            var userId           = "30";
            var twitterAccountId = "1905";

            twitterAccountRepositoryMock
            .Setup(x => x.UserTwitterAccountIsDeleted(userId, twitterAccountId))
            .ReturnsAsync(true);

            var twitterAccountService = new TwitterAccountService(
                unitOfWorkMock.Object,
                mappingProviderMock.Object,
                userRepositoryMock.Object,
                twitterAccountRepositoryMock.Object);

            //Act
            var userIsDeleted = await twitterAccountService.DeleteTwitterAccountFromUser(userId, twitterAccountId);

            //Assert
            Assert.IsTrue(userIsDeleted);
        }
        public void ThrowArgumentException_WhenInvokedWithInvalidEmptyUserIdParameter()
        {
            //Arrange
            var unitOfWorkMock               = new Mock <IUnitOfWork>();
            var mappingProviderMock          = new Mock <IMappingProvider>();
            var userRepositoryMock           = new Mock <IUserRepository>();
            var twitterAccountRepositoryMock = new Mock <ITwitterAccountRepository>();

            var userId           = "30";
            var twitterAccountId = "1905";

            twitterAccountRepositoryMock
            .Setup(x => x.UserTwitterAccountIsDeleted(userId, twitterAccountId))
            .ReturnsAsync(true);

            var twitterAccountService = new TwitterAccountService(
                unitOfWorkMock.Object,
                mappingProviderMock.Object,
                userRepositoryMock.Object,
                twitterAccountRepositoryMock.Object);

            //Act && Assert
            Assert.ThrowsExceptionAsync <ArgumentException>(() => twitterAccountService.DeleteTwitterAccountFromUser(string.Empty, twitterAccountId));
        }