예제 #1
0
        public void DeleteSectionTest()
        {
            Delete();
            var configFile = new ConfigFile <Configuration>(FilePath);
            var another    = new AnotherConfigSection();
            var test       = new TestConfigSection()
            {
                Value = 155
            };

            configFile.Write(another, test);

            Assert.AreEqual(155, configFile.Read <TestConfigSection>().Value);

            configFile.DeleteSection <TestConfigSection>();
            Assert.AreEqual(15, configFile.Read <AnotherConfigSection>().Number);
            Assert.AreEqual(9, configFile.Read <TestConfigSection>().Value);
        }