The black one is most likely e, b, c (facing the flat surface).
The metal casing one is e, b,c if you stare at the bottom and starting from the key tab, clockwise.
If you have a multimeter, it will make life even easier... (see here for example How to Test a Transistor & Diode » Electronics Notes)