MoveToNextSection() public method

public MoveToNextSection ( ) : bool
return bool
示例#1
0
        public void MoveToNextSection()
        {
            StringWriter writer = new StringWriter();

            writer.WriteLine("; Test");
            writer.WriteLine("; Test 1");
            writer.WriteLine("[Nini Thing]");
            IniReader reader = new IniReader(new StringReader(writer.ToString()));

            Assert.IsTrue(reader.MoveToNextSection());
            Assert.AreEqual(4, reader.LineNumber);
            Assert.AreEqual(IniType.Section, reader.Type);
            Assert.IsFalse(reader.MoveToNextSection());
        }
示例#2
0
        public void MoveToNextSection() {
            StringWriter writer = new StringWriter();
            writer.WriteLine("; Test");
            writer.WriteLine("; Test 1");
            writer.WriteLine("[Nini Thing]");
            IniReader reader = new IniReader(new StringReader(writer.ToString()));

            Assert.IsTrue(reader.MoveToNextSection());
            Assert.AreEqual(4, reader.LineNumber);
            Assert.AreEqual(IniType.Section, reader.Type);
            Assert.IsFalse(reader.MoveToNextSection());
        }