Switzerland was at risk of being invaded by Germany during World War II but historians say because every Swiss man was armed and trained to shoot the Germans did not invade.
Though I'm very much in favor of an armed citizenry as a check against the tyrannical tendancies of government, the Swiss are not the poster child for this cause.
The reason the Germans didn't invade Switzerland, is because they didn't need to, as the Swiss had already rolled over and given them pretty much everything they asked for...
1. access to the Swiss banking system.
2. expulsion of Jewish refugees from Germany.
3. access to Swiss rail lines to Italy.
4. liberal dispensation of visas for use by German spies and business peeps.
Apart from having no reason to invade Switzerland, the real difficulty in doing so was and has always been the Alps. And the Germans knew that the Swiss had all of the bridges spanning mountain passes mined and ready for demolition.
A lot of Swiss peeps made big bucks during the war, especially the banks.
Don't forget, 1/3 of Swiss people are of German descent and speak a varient of the German language. There were many sympathetic to the German cause in Switzerland.