MacBook Pro keeps randomly shutting down
I have a Mid 2010 Macbook Pro, whenever i close the laptop and leave it for about 2-5 minutes, it will not turn back on without me holding the power buttong for a good amount of time. I recently just replaced the hard drive and RAM, and today I just replaced the thermal paste. I have already done an SMC reset, and have reset the PRAM. And have tried the hardware test, but when I try it I am given a message saying my laptop can not use it. Does anyone have any suggestions on what could be the problem?
MacBook Pro, OS X Mavericks (10.9.1), MacBook Pro Mid 2010