Use an ohmmeter to check switch continuity.
Oil pressure switch specification
During Engine Running: No continuity (INFINITY ohm)
At Engine Stop: Continuity (0 ohm)