Example #1
0
        public void CallResult(string callId, object result)
        {
            WampMessage <MockRaw> serialized =
                SerializeCallResult(callId, result);

            WampMessage <MockRaw> raw =
                WampV1Messages.CallResult(callId, result);

            Assert.That(serialized, Is.EqualTo(raw).Using(mComparer));
        }
Example #2
0
        public void Call(string callId, string procUri, object[] arguments)
        {
            WampMessage <MockRaw> serialized =
                SerializeCall(callId, procUri, arguments);

            WampMessage <MockRaw> raw =
                WampV1Messages.Call(callId, procUri, arguments);

            Assert.That(serialized, Is.EqualTo(raw).Using(mComparer));
        }
Example #3
0
        public void CallError(string callId, string errorUri, string errorDesc, object errorDetails)
        {
            WampMessage <MockRaw> serialized =
                SerializeCallError(callId, errorUri, errorDesc, errorDetails);

            WampMessage <MockRaw> raw =
                WampV1Messages.CallError(callId, errorUri, errorDesc, errorDetails);

            Assert.That(serialized, Is.EqualTo(raw).Using(mComparer));
        }
Example #4
0
        public void Prefix(string prefix, string uri)
        {
            WampMessage <MockRaw> serialized =
                SerializePrefix(prefix, uri);

            WampMessage <MockRaw> raw =
                WampV1Messages.Prefix(prefix, uri);

            Assert.That(serialized, Is.EqualTo(raw).Using(mComparer));
        }
Example #5
0
        public void Welcome(string sessionId, int protocolVersion, string serverIdent)
        {
            WampMessage <MockRaw> serialized =
                SerializeWelcome(sessionId, protocolVersion, serverIdent);

            WampMessage <MockRaw> raw =
                WampV1Messages.Welcome(sessionId, protocolVersion, serverIdent);

            Assert.That(serialized, Is.EqualTo(raw).Using(mComparer));
        }
Example #6
0
        public void Publish(string topicUri, object @event, string[] exclude, string[] eligible)
        {
            WampMessage <MockRaw> serialized =
                SerializePublish(topicUri, @event, exclude, eligible);

            WampMessage <MockRaw> raw =
                WampV1Messages.Publish(topicUri, @event, exclude, eligible);

            Assert.That(serialized, Is.EqualTo(raw).Using(mComparer));
        }
Example #7
0
        public void Unsubscribe(string topicUri)
        {
            WampMessage <MockRaw> serialized =
                SerializeUnsubscribe(topicUri);

            WampMessage <MockRaw> raw =
                WampV1Messages.Unsubscribe(topicUri);

            Assert.That(serialized, Is.EqualTo(raw).Using(mComparer));
        }
Example #8
0
        public void Welcome()
        {
            MockConnection <MockRaw> connection = new MockConnection <MockRaw>(mFormatter);
            IWampClient client = mBuilder.Create(connection.SideAToSideB);

            client.Welcome("v59mbCGDXZ7WTyxB", 1, "Autobahn/0.5.1");

            WampMessage <MockRaw> serialized =
                mOutgoingMessageHandler.Message;

            WampMessage <MockRaw> raw =
                WampV1Messages.Welcome("v59mbCGDXZ7WTyxB", 1, "Autobahn/0.5.1");

            Assert.That(serialized, Is.EqualTo(raw).Using(mComparer));
        }