But the victory was tempered by an injury to Scott Robinson who was stretchered off with what looked like a broken leg.
The match was part of the summer series at the Leigh Sports Village following the Scottish club's training camp in Chester.
Sam Nicholson opened the scoring for Hearts inside two minutes with Kamil Bilinski equalising from close range for Dinamo on 15.
And later in the first half, Oliver fired home the winner on the rebound after the Dinamo keeper had parried Jamie Walker’s initial shot.
The Romanian side ended the match with 10 men.