public void TestParseBool() { Config cfg = new Config(VALID_APPNAME); Assert.AreEqual(true, cfg.GetParameterAsBool("TypedData", "Bool1")); Assert.AreEqual(false, cfg.GetParameterAsBool("TypedData", "Bool2")); bool threw = false; try { cfg.GetParameterAsBool("TypedData", "CantParse"); } catch { threw = true; } Assert.IsTrue(threw, "Failed to throw when parsing invalid input."); }