Send() public method

Sends the specified message (Synchronously).
message Channel is disposing.
public Send ( ExecutionStatusCallbackMessage message ) : void
message ExecutionStatusCallbackMessage The message.
return void
        public void Send_Where_MessageDoesntHaveCallbackRegistered_Expect_CallbackNotInvoked()
        {
            ExecutionStatusCallbackDispatcher _executionStatusCallbackDispatcher = new ExecutionStatusCallbackDispatcher();

            bool expected = false;
            bool actual = false;

            Guid guid = Guid.NewGuid();
            Action<ExecutionStatusCallbackMessage> callback = m => { actual = true; };
            ExecutionStatusCallbackMessage message = new ExecutionStatusCallbackMessage(Guid.NewGuid(), ExecutionStatusCallbackMessageType.Unknown);

            _executionStatusCallbackDispatcher.Add(guid, callback);
            _executionStatusCallbackDispatcher.Send(message);

            Assert.AreEqual(expected, actual);
        }
 public void Send_Where_MessageIsNull_Expect_ArgumentNullException()
 {
     ExecutionStatusCallbackDispatcher _executionStatusCallbackDispatcher = new ExecutionStatusCallbackDispatcher();
     _executionStatusCallbackDispatcher.Send(null);
 }