As well as being a rollicking good story, Oliver Goldsmith's The Vicar of Wakefield is also a didactic novel in that it aims to teach its readers a moral lesson.
The lesson in question is the overriding importance of acting according to Christian virtues. Goldsmith was doubtless aware that many Christians in his own time paid only lip service to the moral teachings of Christ. And so he felt that it was entirely appropriate that, through the medium of literature, he would encourage people to live true Christian lives, to lead an example of moral virtue that others would follow.
The protagonist of the story, Dr. Charles Primrose, the eponymous Vicar of Wakefield, certainly fits the bill of a moral role model, a man who in his words and actions displays all the Christian virtues. This is despite the fact that the good doctor encounters a good deal of adversity throughout the story that most of us would find incredibly hard to deal with.
At various points in the story, Primrose is subjected to unpleasant experiences—most notably being thrown in prison for not paying rent—that would test the faith of a saint. And yet despite everything, Primrose retains a firm hold on his faith and the other Christian virtues.
A prime example of his Christian virtue comes when he is in prison. One of his fellow inmates is a man called Ephraim Jenkinson, a con man who'd earlier cheated him out of a horse. Most people in Dr. Primrose's situation wouldn't give Jenkinson the time of day. But then, Primrose isn't most people. Adhering as strongly as ever to the Christian theological virtues of faith, hope, and charity, he actually reaches out to Jenkinson in a genuine, heartfelt attempt to make him see the error of his ways.
In the remarkable character of Dr. Charles Primrose, a man who lives his faith on a daily basis, come what may, we see a living embodiment of the Christian virtues to which Goldsmith wants to recall his readers.