Exemple #1
0
 /// <summary>
 /// Triggers the ConnectionChanged event.
 /// </summary>
 public virtual void OnConnectionChanged(ConnectionChangedEventArgs ea)
 {
     if (ConnectionChanged != null)
         ConnectionChanged(this, ea);
 }
 internal override void _outPortMgr_ConnectionChanged(IOutputPortMgr sender, ConnectionChangedEventArgs ea)
 {
     _outPortMgr_ConnectionChanged_TimesCalled++;
 }
Exemple #3
0
 internal void OutputPort_ConnectionChanged(IOutputPort sender, ConnectionChangedEventArgs ea)
 {
     if (sender == null)
         return;
     OnConnectionChanged(ea);
 }
Exemple #4
0
 public void ConnectionChanged_DummyHandler(IInputPortMgr sender, ConnectionChangedEventArgs ea)
 {
     ConnectionChanged_TimesCalled++;
     RecievedEventArgs = ea;
     RecievedSender = sender;
 }
Exemple #5
0
 public void ConnectionChanged_DummyHandler(IOutputNetworkPort sender, ConnectionChangedEventArgs ea)
 {
     ConnectionChanged_TimesCalled++;
     RecievedEventArgs = ea;
     RecievedSender = sender;
 }
Exemple #6
0
 public void InputConnected_DummyHandler(IInputNeutralPort sender, ConnectionChangedEventArgs ea)
 {
     InputConnected_TimesCalled++;
     RecievedEventArgs = ea;
     RecievedSender = sender;
 }
Exemple #7
0
 internal void _outPortMgr_ConnectionChanged(IOutputPortMgr sender, ConnectionChangedEventArgs ea)
 {
     // Do nothing here since there is no need to change the status of the element;
     // (used to throw a NotImplementedException here but it interfered with testing compound elements).
 }
Exemple #8
0
 internal void _inPortMgr_ConnectionChanged(IInputPortMgr sender, ConnectionChangedEventArgs ea)
 {
     if (sender != null)
     {
         if (ea.Action != ConnectionAction.None)
         {
             // in all cases, the element state will go to incomplete.  All cases should be set to
             // incomplete by the _inPortMgr_ConnectionChanging handler, we do it here also for
             // consistency
             SetStatus(ElementStatus.Incomplete, StatusChangeDriver.NormalTransition, null);
         }
     }
 }
Exemple #9
0
 internal void InputPort_ConnectionChanged(IInputPort sender, ConnectionChangedEventArgs ea)
 {
     if (sender == null)
         return;
     // this input mgr becomes the new sender for the next level up
     OnConnectionChanged(ea);
 }
Exemple #10
0
 internal virtual void _outPortMgr_ConnectionChanged(IOutputPortMgr sender, ConnectionChangedEventArgs ea)
 {
     throw new NotImplementedException("The method or operation is not implemented.");
 }
        public void OutputPortMgrConnectionChangedEventHandlerUpdatesElementStateToIncompleteWhenActionIsReplace()
        {
            ElementStatus expectedStatus = ElementStatus.Incomplete;
            ConnectionAction action = ConnectionAction.Replace;
            ConnectionChangedEventArgs args = new ConnectionChangedEventArgs(action);
            var mockOutPortMgr = new Mock<IOutputPortMgr>();
            _el._outPortMgr_ConnectionChanged(mockOutPortMgr, args);

            ElementStatus actualStatus = _el.Status;

            Assert.Equal(expectedStatus, actualStatus);
        }