public void _elementsMgr_AddedEventHandlerFiresElementInstancesAddedEventWhenElementsAreSuccessfullyAdded() { var wkSpce = new WorkSpace(); // verify the event handler fires the event by catching it with a helper event handler. var mockElMgr = new Mock<IElements>(); var mockEl = new Mock<IElement>(); var helper = new HelperForWorkSpaces(); wkSpce.ElementInstancesAdded += new InstanceAddedEventHandler<IWorkSpace, ElementInstancesAddedEventArgs>(helper.ElementInstancesAdded_DummyHandler); var ea = new ElementCollectionEventArgs(CollectionEventArgs.CollectionAction.Add, mockEl.Object); wkSpce.ElementsMgr = mockElMgr.Object; wkSpce._elementsMgr_Added(mockElMgr.Object, ea); Assert.Equal(1, helper.ElementInstancesAdded_TimesHandled); }