Example #1
0
		public void CheckIP_SectionHeadDiff()
		{
			CheckDisposed();
			CompleteInitialize(true, m_philemonRev);

			using (DummyDiffView view = new DummyDiffView(Cache, m_philemonCurr,
				m_bookMerger.Differences, false))
			{
				view.StyleSheet = m_styleSheet;
				view.MakeRoot();
				view.PerformLayout();
				view.RootBox.Activate(VwSelectionState.vssEnabled);
				Difference diff1 = m_bookMerger.Differences.MoveFirst();
				view.ScrollToParaDiff(diff1.HvoCurr, diff1.IchMinCurr);

				// The IP should be set in a section heading and at the beginning of the difference.
				SelectionHelper helper = SelectionHelper.Create(view);
				Assert.AreEqual(12, helper.IchAnchor);
				Assert.AreEqual((int)ScrSection.ScrSectionTags.kflidHeading, helper.LevelInfo[1].tag);
			}
		}