public void UnRegisterReceiverIgnoreNonRegistered() { IPortReceive ipr = new Port<int> (); ReceiverTask rt = new EvalTask (true); ipr.UnregisterReceiver (rt); }
public void UnRegisterReceiverChangesGetReceivers() { IPortReceive ipr = new Port<int> (); ReceiverTask rt = new EvalTask (true); Assert.AreEqual (0, ipr.GetReceivers ().Length, "#1"); ipr.RegisterReceiver (rt); ipr.RegisterReceiver (rt); Assert.AreEqual (2, ipr.GetReceivers ().Length, "#3"); ipr.UnregisterReceiver (rt); Assert.AreEqual (1, ipr.GetReceivers ().Length, "#4"); ipr.UnregisterReceiver (rt); Assert.AreEqual (0, ipr.GetReceivers ().Length, "#5"); }