To test, take the two wires off the switch (they just pull off, bullet type connectors) and use a short piece of wire poked in the wire connectors to join them electrically. Then the brake light should be on (key ON of course).
brake light on = bad switch
brake light off = bad wiring (possibly a bad switch as well)
To test the switch, connect an ohmeter across the switch terminal posts. The reading should be very high with no brake applied and should drop a lot when the brake lever is pulled, down to 1 ohm or less if your meter is accurate.