public void ApproveAndMoveNext_NewWordGloss()
{
#if WANTPORTWFIC // Undo is not working. The part of the test up to Undo works, but leaves extra things on the Undo stack
// that mess things up when this test is run first (NUnit) though not when run last (Resharper).
var xfics = AnnotationServices.GetAnalysisOccurrences(m_para0_0).ToList();
m_interlinDoc.SelectAnnotation(xfics[0]);
var initialAnalysisTree_wfic0 = m_focusBox.InitialAnalysis;
var newAnalysisTree_wfic0 = m_focusBox.NewAnalysisTree;
m_focusBox.DoDuringUnitOfWork = () =>
WordAnalysisOrGlossServices.CreateNewAnalysisTreeGloss(initialAnalysisTree_wfic0.Wordform);
var undoRedoText = new MockUndoRedoText("Undo", "Redo");
m_focusBox.ApproveAndMoveNext(undoRedoText);
// expect change to the first wfic.
Assert.AreEqual(newAnalysisTree_wfic0.Gloss, xfics[0].Analysis);
// expect the focus box to be on the next wfic.
Assert.AreEqual(xfics[1], m_focusBox.SelectedWfic);
// test undo.
Assert.AreEqual(1, Cache.ActionHandlerAccessor.UndoableSequenceCount);
Cache.ActionHandlerAccessor.Undo();
Assert.AreEqual(initialAnalysisTree_wfic0.Object, xfics[0].Analysis);
// expect the focus box to be back on the first wfic.
Assert.AreEqual(xfics[0], m_focusBox.SelectedWfic);
#endif
}