public void HasChangedLinesSinceWithZeroIndexAndSingleLine()
        {
            JSBuilder builder = new JSBuilder();

            builder.Text("abc");
            Assert.IsFalse(builder.HasChangedLinesSince(0));
        }
        public void HasChangedLinesSinceWithNegativeIndexAndMultipleLines()
        {
            JSBuilder builder = new JSBuilder();

            builder.Text("a\nb\nc");
            Assert.ThrowsException <IndexOutOfRangeException>(() => builder.HasChangedLinesSince(-1));
        }
        public void HasChangedLinesSinceWithZeroIndexAndMultipleLines()
        {
            JSBuilder builder = new JSBuilder();

            builder.Text("a\nb\nc");
            Assert.IsTrue(builder.HasChangedLinesSince(0));
        }
Exemple #4
0
 protected bool HasChangedLinesSince(int index)
 {
     return(builder.HasChangedLinesSince(index));
 }
        public void HasChangedLinesSinceWithZeroIndexAndEmptyBuilder()
        {
            JSBuilder builder = new JSBuilder();

            Assert.IsFalse(builder.HasChangedLinesSince(0));
        }
        public void HasChangedLinesSinceWithNegativeIndexAndEmptyBuilder()
        {
            JSBuilder builder = new JSBuilder();

            Assert.ThrowsException <IndexOutOfRangeException>(() => builder.HasChangedLinesSince(-1));
        }