Exemplo n.º 1
0
        public void Write()
        {
            var TestObject = new Utilities.IO.FileFormats.INI(@".\Testing\TestFile.ini");
            TestObject.WriteToINI("Section1", "Key3", "SpecialValue");

            TestObject = new Utilities.IO.FileFormats.INI(@".\Testing\TestFile.ini");
            Assert.Equal("Value1", TestObject.ReadFromINI("Section1", "Key1"));
            Assert.Equal("Value2", TestObject.ReadFromINI("Section1", "Key2"));
            Assert.Equal("SpecialValue", TestObject.ReadFromINI("Section1", "Key3"));
            Assert.Equal("Value3", TestObject.ReadFromINI("Section2", "Key1"));
            Assert.Equal("Value4", TestObject.ReadFromINI("Section2", "Key2"));
        }
        public void Write()
        {
            var TestObject = new Utilities.IO.FileFormats.INI(@".\Testing\TestFile.ini");

            TestObject.WriteToINI("Section1", "Key3", "SpecialValue");

            TestObject = new Utilities.IO.FileFormats.INI(@".\Testing\TestFile.ini");
            Assert.Equal("Value1", TestObject.ReadFromINI("Section1", "Key1"));
            Assert.Equal("Value2", TestObject.ReadFromINI("Section1", "Key2"));
            Assert.Equal("SpecialValue", TestObject.ReadFromINI("Section1", "Key3"));
            Assert.Equal("Value3", TestObject.ReadFromINI("Section2", "Key1"));
            Assert.Equal("Value4", TestObject.ReadFromINI("Section2", "Key2"));
        }