示例#1
0
        public void GetLineContentOutOfBounds()
        {
            var f = new PhysicalFile()
            {
                Sourcecode = "a\nabc\na"
            };

            Assert.Throws <IndexOutOfRangeException>(() => f.GetSourceLine(3));
        }
示例#2
0
        public void GetLineContentWithSlashR()
        {
            var f = new PhysicalFile()
            {
                Sourcecode = "a\r\nabc\r\na"
            };
            var actual = f.GetSourceLine(1);

            Assert.AreEqual("abc", actual);
        }