For the HDD - it should be fine. Just plug it in. If it isn't working, there won't be any negative effect to your computer. All you need to do is go to Windows Explorer > This PC and it will display the hard drives. If it isn't there, it isn't fully operational.
For the RAM, it most likely is fully operational. To make sure, though, download
memtest86 and to extract the EXE file to the desktop. Then, get a USB flash drive and plug it in. Then run the EXE and install everything. Then turn off your computer, go to your BIOS, and select the USB flash drive as the first boot device.