示例#1
0
        public void TestSave()
        {
            var specificAttribute = new SpecificAttribute();
              this.parser.Fill(specificAttribute);
              specificAttribute.OwnerName = "Jane Doe";
              this.parser.Save(specificAttribute);
              Assert.Equal(parser["owner"]["name"], "Jane Doe");

              var parser2 = new IniParser("testdata.ini", true);
              Assert.Equal(parser2["owner"]["name"], "Jane Doe");

              parser2["owner"]["name"] = "John Doe";
              parser2.Save();
        }
示例#2
0
 public ParserTests()
 {
     var file = "testdata.ini";
       this.parser = new IniParser(file);
       this.parser.Parse();
 }