public void RaisingDirtyChangedEventOnWixPackageFilesControlFiresPackageFilesViewIsDirtyChangedEvent() { bool dirtyChangedEventFired = false; packageFilesView.IsDirtyChanged += delegate(object source, EventArgs e) { dirtyChangedEventFired = true; }; mockPackageFilesControl.RaiseDirtyChangedEvent(); Assert.IsTrue(dirtyChangedEventFired); }
public void RaiseDirtyChangedMethodFiresDirtyChangedEvent() { bool dirtyChangedEventFired = false; control.DirtyChanged += delegate(object source, EventArgs e) { dirtyChangedEventFired = true; }; control.RaiseDirtyChangedEvent(); Assert.IsTrue(dirtyChangedEventFired); }