Is this an appropriate way to test a 7805?
No that is NOT a proper or useful way to test 3-terminal regulators.  The technique is valid for SOME (but not all) kinds of transistors. But it is completely unsuitable for an integrated circuit like a 3-terminal regulator. It will yield unpredictable (and most likely meaningless and misleading) results.

If you don't have a DC power supply, why do you even need to test 3-terminal regulators?  For that matter why do you even need 3-terminal regulators at all? Absent the context it is not clear what you are trying to do here?

You can use batteries as a DC source. Remember that you typically need 3V HIGHER input voltage than the regulator puts out.  It would also be prudent to put a LOAD on the output of the regulator. At least something around 500 to 1000 ohms or so.