Luke 1:6

They were both righteous before God, walking in all the commandments and ordinances of the Lord, blameless.

Acts 13:22

And when he had removed him, he raised up David to be their king; to whom he gave this testimony: I have found David the son of Jesse a man after my own heart, who will do all my will.

Acts 13:36

For David, after serving the purpose of God in his own generation, fell asleep, and was laid with his fathers, and saw corruption.

Treasury of Scripture Knowledge

Summary

Because David did that which was right in the eyes of the LORD, and turned not aside from any thing that he commanded him all the days of his life, save only in the matter of Uriah the Hittite.

Bible References

David

Luke 1:6
They were both righteous before God, walking in all the commandments and ordinances of the Lord, blameless.
Acts 13:22
And when he had removed him, he raised up David to be their king; to whom he gave this testimony: I have found David the son of Jesse a man after my own heart, who will do all my will.