示例#1
0
        public void SQP_SerializeChallangeResponse_NoError()
        {
            var id  = (uint)1337;
            var snd = new ChallangeResponse();

            snd.Header.ChallangeId = id;

            snd.ToStream(ref writer);

            var rcv = new ChallangeResponse();

            rcv.FromStream(ref reader);

            Assert.AreEqual((byte)SQPMessageType.ChallangeResponse, rcv.Header.Type);
            Assert.AreEqual(id, (uint)rcv.Header.ChallangeId);
        }
示例#2
0
        public void SQP_SerializeChallangeResponse_NoError()
        {
            var id  = (uint)1337;
            var snd = new ChallangeResponse();

            snd.Header.ChallangeId = id;

            snd.ToStream(ref writer);

            var rcv = new ChallangeResponse();

            reader  = new DataStreamReader(writer, 0, writer.Length);
            context = default(DataStreamReader.Context);
            rcv.FromStream(reader, ref context);

            Assert.AreEqual((byte)SQPMessageType.ChallangeResponse, rcv.Header.Type);
            Assert.AreEqual(id, (uint)rcv.Header.ChallangeId);
        }