示例#1
0
 public void ThreadSendsRemoveChannelMessage()
 {
     conductor.RemovePublication(CORRELATION_ID);
     AssertReadsOneMessage((msgTypeId, buffer, index, length) =>
     {
         RemoveMessageFlyweight message = new RemoveMessageFlyweight();
         message.Wrap(buffer, index);
         Assert.That(msgTypeId, Is.EqualTo(ControlProtocolEvents.REMOVE_PUBLICATION));
         Assert.That(message.RegistrationId(), Is.EqualTo(CORRELATION_ID));
     });
 }
示例#2
0
        public void ThreadSendsRemoveSubscriberMessage()
        {
            conductor.RemoveSubscription(CORRELATION_ID);

            AssertReadsOneMessage((msgTypeId, buffer, index, length) =>
            {
                RemoveMessageFlyweight removeMessage = new RemoveMessageFlyweight();
                removeMessage.Wrap(buffer, index);
                Assert.That(msgTypeId, Is.EqualTo(ControlProtocolEvents.REMOVE_SUBSCRIPTION));
                Assert.That(removeMessage.RegistrationId(), Is.EqualTo(CORRELATION_ID));
            });
        }