Also, idk about in your neck of the woods, but around here junkyards have a 90 day warranty on any used drivetrain parts. It sucks if you have to do a swap all over again, but at least there is a guarantee. If going to a junkyard where you don't know the history, try to stick to one with under 100k miles on it. Around here I have a few options for under $500 and under 80k miles but subaru's are plentiful here.
If the fluids have already been drained, check the magnet in the pan as blacky said.