Use an ohmmeter to check switch continuity.
Oil pressure switch specifications
During engine running: No continuity (infinite)
At engine stop: Continuity (0 ohms)