Place the generator on a hard, level surface. Remove the oil dipstick near the bottom of the engine and check the oil level; add oil if needed.
Disconnect the wire coming off the engine oil switch. The oil switch wire will exit from the engine, near the starter; follow the wire to the wire harness.
Turn on the ohmmeter and set the ohmmeter to the lowest ohms setting. Place the positive lead from the ohmmeter into the connector on the engine oil switch; place the negative lead from the ohmmeter to a suitable ground on the engine. There should be no continuity.
Drain out all the engine oil and check the continuity once again; there should be no more than 2 ohms of resistance. If either reading differs, replace the switch.