Пример #1
0
        public void Create()
        {
            var sender = new EndpointId("sendingEndpoint");
            var msg    = new EndpointDisconnectMessage(sender);

            Assert.IsNotNull(msg.Id);
            Assert.AreSame(sender, msg.Sender);
            Assert.AreEqual(string.Empty, msg.ClosingReason);
            Assert.AreEqual(MessageId.None, msg.InResponseTo);
        }
Пример #2
0
        public void CreateWithIdAndReason()
        {
            var sender = new EndpointId("sendingEndpoint");
            var id     = new MessageId();
            var reason = "reason";
            var msg    = new EndpointDisconnectMessage(sender, id, reason);

            Assert.AreSame(id, msg.Id);
            Assert.AreSame(sender, msg.Sender);
            Assert.AreSame(reason, msg.ClosingReason);
            Assert.AreEqual(MessageId.None, msg.InResponseTo);
        }