Esempio n. 1
0
        public void DoSomehow_WorksDuringPropChanged()
        {
            m_actionHandler.EndUndoTask();
            var propChangeHandler = new PropChangedImplementor()
            {
                Parent = this
            };

            Cache.DomainDataByFlid.AddNotification(propChangeHandler);
            ILexEntry entry = null;

            NonUndoableUnitOfWorkHelper.Do(m_actionHandler, () => { entry = MakeEntry("an entry"); });             // new object, no PropChanged sent
            NonUndoableUnitOfWorkHelper.Do(m_actionHandler,
                                           () =>
                                           entry.LexemeFormOA.Form.VernacularDefaultWritingSystem =
                                               TsStringUtils.MakeString("changed", Cache.DefaultVernWs));  // triggers PropChanged, which triggers another UOW
            Assert.That(propChangeHandler.Entry, Is.Not.Null);
        }
Esempio n. 2
0
 public void DoSomehow_WorksWhenNoUowIsActive()
 {
     m_actionHandler.EndUndoTask();
     NonUndoableUnitOfWorkHelper.DoSomehow(m_actionHandler, () => MakeEntry("an entry"));
 }
Esempio n. 3
0
 public void DoSomehow_WorksDuringOtherUow()
 {
     // Baseclass arranges that a UOW is active at the start of all test methods.
     NonUndoableUnitOfWorkHelper.DoSomehow(m_actionHandler, () => MakeEntry("an entry"));
 }