public void OutputPort_ConnectionChanged() { IOutputNetworkPort port = new OutputNetworkPort(); OutputPortMgr mgr = new OutputPortMgr(); var helper = new HelperForOutputPortMgr(); mgr.ConnectionChanged += helper.ConnectionChanged_DummyHandler; mgr.Add(port); INetworkPipe nPipe = _pipeFactory.CreateNetworkPipe(); port.Add(nPipe); Assert.Equal(1, helper.ConnectionChanged_TimesCalled); }
public void OutputPortMgrHandlesConnectionChangeEventFiredByIOutputNetworkPortWhenAConnectionChanged() { var port = new OutputNetworkPort(); var mgr = new OutputPortMgr(); var helper = new HelperForOutputPortMgr(); mgr.ConnectionChanging += helper.ConnectionChanging_DummyHandler; mgr.ConnectionChanged += helper.ConnectionChanged_DummyHandler; mgr.Add(port); INetworkPipe dPipe = _pipeFactory.CreateNetworkPipe(); port.Add(dPipe); Assert.Equal(1, helper.ConnectionChanging_TimesCalled); }
public void VerifyConnectionChangeEventHandlerIsImplementedForNetworkPipes() { // this just runs through event handlers to insure there are no notImplementedExceptions IOutputNetworkPort port = new OutputNetworkPort(); OutputPortMgr mgr = new OutputPortMgr(); mgr.Add(port); INetworkPipe nPipe = _pipeFactory.CreateNetworkPipe(); port.Add(nPipe); }