If someone dies while performing an act of obedience then we hope that he will enter paradise, as the Prophet sallallaahu `alayhi wa sallam ( may Allah exalt his mention ) said:
"When Allah wants good for a person, He uses him." The companions may Allah be pleased with them asked: "How does He use him, O Prophet of Allah?" The Prophet sallallaahu `alayhi wa sallam ( may Allah exalt his mention ) replied: "He enables him to perform a good deed before his death." [Ahmad].
The Prophet sallallaahu `alayhi wa sallam ( may Allah exalt his mention ) also said: "Actions are judged according to their end [i.e. if one performs actions of the dwellers of paradise and then dies, then it is hoped that he will enter paradise, and if one performs the actions of the inmates of Hell and dies, then is subject to entering Hellfire.]".