public void Update_Should_Call_UnitOfWork_And_Repository() { // Act _ = _productsProvider.Update(new ProductEntity()); // Assert _unitOfWorkMock.Verify(x => x.Repository <ProductEntity>(), Times.Once()); _repositoryMock.Verify(x => x.Attach(It.IsAny <ProductEntity>()), Times.Once()); _unitOfWorkMock.Verify(x => x.SaveChanges(), Times.Once()); }