AddNotification() public method

We want to intercept notifications. So instead of registering the root box with the wrapped SDA, we register ourself.
public AddNotification ( IVwNotifyChange nchng ) : void
nchng IVwNotifyChange
return void
        public void PropChanged()
        {
            var mockRoot = new MockNotifyChange();

            // When the root box asks the decorator to notify it, the decorator adds itself to the wrapped decorator instead.
            m_decorator.AddNotification(mockRoot);
            Assert.That(m_publisher.AddedNotification, Is.EqualTo(m_decorator));

            // Unknown flid PropChanged calls go right through.
            m_decorator.PropChanged(27, LexEntryTags.kflidLexemeForm, 10, 11, 12);
            VerifyPropChanged(mockRoot.LastPropChanged, 27, LexEntryTags.kflidLexemeForm, 10, 11, 12);

            // Flids we modify are overridden: a substitute PropChanged is sent, which does not know the
            // number deleted, but claims all current items are inserted.
            m_decorator.PropChanged(m_hot.Hvo, LexEntryTags.kflidSenses, 2, 1, 1);
            VerifyPropChanged(mockRoot.LastPropChanged, m_hot.Hvo, LexEntryTags.kflidSenses, 0, 2, 0);

            int lexEntryRefsFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "LexEntryReferences", false);

            m_decorator.PropChanged(m_arm.Hvo, lexEntryRefsFlid, 2, 1, 0);
            VerifyPropChanged(mockRoot.LastPropChanged, m_arm.Hvo, lexEntryRefsFlid, 0, 1, 0);

            int complexRefsFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "ComplexFormEntryRefs", false);

            m_decorator.PropChanged(m_hotBlank.Hvo, complexRefsFlid, 0, 0, 3);
            VerifyPropChanged(mockRoot.LastPropChanged, m_hotBlank.Hvo, complexRefsFlid, 0, 0, 0);

            // and when it asks to be removed, it removes itself.
            m_decorator.RemoveNotification(mockRoot);
            Assert.That(m_publisher.RemovedNotification, Is.EqualTo(m_decorator));
        }