public void UsersRepositoryGetCallsGetFromTheUnitOfWorkAndReturnsNullForANonExistingUser()
        {
            // Arrange
            var unitOfWorkMock = new Mock<IUnitOfWork>();
            var repository = new UsersRepository(unitOfWorkMock.Object);

            // Act
            var result = repository.Get(User3PartitionKey, User3RowKey);

            // Assert
            Assert.IsNull(result);
            unitOfWorkMock.Verify(uow => uow.Get<UserEntity>("Users", User3PartitionKey, User3RowKey), Times.Once());
        }
        public void UsersRepositoryGetCallsWithFilterGetFromTheUnitOfWorkAndReturnsAExistingTaskList()
        {
            // Arrange
            var user = new User { PartitionKey = User1PartitionKey, RowKey = User1RowKey };
            var unitOfWorkMock = new Mock<IUnitOfWork>();
            unitOfWorkMock.Setup(u => u.Get("Users", It.IsAny<Expression<Func<User, bool>>>())).Returns(user);
            var repository = new UsersRepository(unitOfWorkMock.Object);

            // Act
            var result = repository.Get(n => n.PartitionKey == User1PartitionKey && n.RowKey == User1RowKey);

            // Assert
            Assert.IsNotNull(result);
            unitOfWorkMock.Verify(uow => uow.Get("Users", It.IsAny<Expression<Func<User, bool>>>()), Times.Once());
        }
        public void UsersRepositoryGetCallsGetFromTheUnitOfWorkAndReturnsAExistingUser()
        {
            // Arrange
            var user = new UserEntity { PartitionKey = User1PartitionKey, RowKey = User1RowKey };
            var unitOfWorkMock = new Mock<IUnitOfWork>();
            unitOfWorkMock.Setup(u => u.Get<UserEntity>("Users", User1PartitionKey, User1RowKey)).Returns(user);
            var repository = new UsersRepository(unitOfWorkMock.Object);

            // Act
            var result = repository.Get(User1PartitionKey, User1RowKey);

            // Assert
            Assert.IsNotNull(result);
            unitOfWorkMock.Verify(uow => uow.Get<UserEntity>("Users", User1PartitionKey, User1RowKey), Times.Once());
        }