SIL.FieldWorks.IText.MockInterlinDocForAnalyis.SelectOccurrence C# (CSharp) Method

SelectOccurrence() public method

public SelectOccurrence ( SIL.FieldWorks.FDO.DomainServices.AnalysisOccurrence target ) : void
target SIL.FieldWorks.FDO.DomainServices.AnalysisOccurrence
return void
		public override void SelectOccurrence(AnalysisOccurrence target)
		{
			InstallFocusBox();
			FocusBox.SelectOccurrence(target);
		}

Usage Example

Ejemplo n.º 1
0
        public void ApproveAndStayPut_NoChange()
        {
            var ocurrences = SegmentServices.GetAnalysisOccurrences(m_para0_0).ToList();

            m_interlinDoc.SelectOccurrence(ocurrences[0]);
            var initialAnalysisObj = m_focusBox.InitialAnalysis.Analysis;

            // approve same wordform. Should not result in change during approve.
            m_focusBox.NewAnalysisTree.Analysis = ocurrences[0].Analysis;
            var undoRedoText = new MockUndoRedoText("Undo", "Redo");

            m_focusBox.ApproveAndStayPut(undoRedoText);

            // expect no change to the first occurrence.
            Assert.AreEqual(initialAnalysisObj, ocurrences[0].Analysis);
            // expect the focus box to still be on the first occurrence.
            Assert.AreEqual(ocurrences[0], m_focusBox.SelectedOccurrence);

            // nothing to undo.
            Assert.AreEqual(0, Cache.ActionHandlerAccessor.UndoableSequenceCount);
        }