public void UnwrapsConnectionSecureMethodFrame()
        {
            var message = new ConnectionSecure(challenge: Random.Hash());

            _context.Send(_subject, (Inbound, RawFrame.Wrap(_channelNumber, message)));

            if (_messageReceivedSignal.Wait(timeout: TimeSpan.FromMilliseconds(100)))
            {
                var unwrappedMessage = _unwrappedMessage as ConnectionSecure;
                Assert.Equal(expected: message.Challenge, actual: unwrappedMessage.Challenge);
            }
            else
            {
                // No `ConnectionSecure` command was received within 100 millis...
                throw new TimeoutException("Timeout occurred before command was received");
            }
        }
示例#2
0
 public virtual void ConnectionSecure(C context, ConnectionSecure mystruct)
 {
 }