public void TestLineMarginChangeBehaviour() { var sci = new ScintillaExMock() { ShowLineMargin = true }; // at this point, called by constructor Assert.AreEqual(1, sci.UpdateLineMarginCallCount); sci.Text = "".PadLeft(999, 'N').Replace("N", Environment.NewLine) + "// last line"; // ensure we have 1000 lines Assert.AreEqual(1000, sci.Lines.Count); // called by text change Assert.AreEqual(2, sci.UpdateLineMarginCallCount); // ensure margin width is as expected Assert.AreEqual(37, sci.Margins[0].Width); }
public void TestLineMarginChangeBehaviour() { var sci = new ScintillaExMock() { ShowLineMargin = true }; // at this point, called by constructor Assert.AreEqual(1, sci.UpdateLineMarginCallCount); sci.Text = "".PadLeft(999, 'N').Replace("N", Environment.NewLine) + "// last line"; // ensure we have 1000 lines Assert.AreEqual(1000, sci.Lines.Count); // called by text change Assert.AreEqual(2, sci.UpdateLineMarginCallCount); // ensure margin width is as expected Assert.AreEqual(37, sci.Margins[0].Width); }