示例#1
0
        public void AddSectionIntoIniStringsFile()
        {
            var iniFile = new IniStrings();
            var section = new IniSection("Test");

            section.Comment = "a\r\nb\r\nc\r\n";
            section.Add(new IniSectionItem("Connection", " a, b, c, d", "definition of connection string"));
            section.Add(new IniSectionItem("Type", "selector"));

            iniFile.Add(section);

            Assert.AreEqual(1, iniFile.Count);
            Assert.IsTrue(iniFile.Contains("test"));
            Assert.IsTrue(iniFile["test"].Contains("connection"));
            Assert.IsNotNull(iniFile.ToString());
        }
示例#2
0
        public void AddSectionIntoIniStringsFile()
        {
            var iniFile = new IniStrings();
            var section = new IniSection("Test");

            section.Comment = "a\r\nb\r\nc\r\n";
            section.Add(new IniSectionItem("Connection", " a, b, c, d", "definition of connection string"));
            section.Add(new IniSectionItem("Type", "selector"));

            iniFile.Add(section);

            Assert.AreEqual(1, iniFile.Count);
            Assert.IsTrue(iniFile.Contains("test"));
            Assert.IsTrue(iniFile["test"].Contains("connection"));
            Assert.IsNotNull(iniFile.ToString());
        }