public void TestConfig() { string configpath = Path.GetFullPath("testconfig.conf"); try { //Create new config file with default values Config config = new Config(configpath); //Notifications should be switched on by default Assert.IsTrue(config.Notifications); Assert.AreEqual(config.Folders.Count, 0); config.Save(); config = new Config(configpath); } catch (Exception) { if (File.Exists(configpath)) File.Delete(configpath); throw; } File.Delete(configpath); }