Beispiel #1
0
        public void SendMessageShouldSendPacketToServer()
        {
            ServerBytesReceivedRegister.Clear();

            Session.SendMessage(_ignoreMessage);

            // give session time to process message
            Thread.Sleep(100);

            Assert.AreEqual(1, ServerBytesReceivedRegister.Count);
        }
Beispiel #2
0
        public void ISession_TrySendMessageShouldSendPacketToServerAndReturnTrue()
        {
            var session = (ISession)Session;

            ServerBytesReceivedRegister.Clear();

            var actual = session.TrySendMessage(new IgnoreMessage());

            // give session time to process message
            Thread.Sleep(100);

            Assert.IsTrue(actual);
            Assert.AreEqual(1, ServerBytesReceivedRegister.Count);
        }