(Photos: Kecko, Pascal Binczak)
Nazi Germany coveted the prosperous nation of Switzerland and made plans to invade it. But Operation Tannenbaum remained forever a hypothetical exercise and the Swiss were largely spared from the ravages of World War II.
This was in part because the Swiss made thoughtful and thorough plans to defend their nation to the death. Though the Axis powers surrounded Switzerland for almost 5 tears, a German conquest of that nation would be costly--ultimately too costly for Hitler to risk.
Some of the fortifications that the Swiss built to defend their borders include a 10 kilometer stretch of concrete anti-tank barriers near Lake Geneva. These pillars are called "Dragon's Teeth," but people have since come to refer to the remains of this defensive line as the Toblerone Line. That's because they closely resemble Toblerone, the famous Swiss chocolate candy.
-via Atlas Obscura
I don't picture Hitler as a man exercising reasonable judgment, when planning to invade countries. If he were, he would have left Russia alone.
Neither were those 10 km of anti-tank barriers what protected Switzerland... Instead, it was politically protected, being neutral, and "its economic cooperation with Nazi Germany" kept it safe. Germany forced neutral Switzerland to have black-outs, and to use their small air force to force down Allied aircraft over their territory. Switzerland was heavily dependent on the Germany economy, and even instituted censorship, to avoid offending their close partners. Switzerland allowed transports between Germany and Italy in sealed box cars without checking the contents. Buying gold from Germany in exchange for convertible currency (Germany's national currency was no longer accepted as a means of payment in the international markets) was also an important factor.
"their equipment was not very up to date. Eugen Bircher, a Swiss colonel at the time, probably made a correct assessment of the situation when saying that the Germans would have been able to advance towards the Swiss capital Berne with a single tank regiment easily."
http://history-switzerland.geschichte-schweiz.ch/switzerland-second-world-war-ii.html