The testimony of witnesses is taken in three modes:
1. By affidavit;
2. By deposition;
3. By oral examination.
(Enacted 1872.)