TryPoll() public method

public TryPoll ( System.TimeSpan inTimeout, Message &outItem ) : bool
inTimeout System.TimeSpan
outItem jabber.protocol.client.Message
return bool
        void IAuctionSniperDriver.HasReceivedMessageFromServer()
        {
            Message msg;

            Assert.That(mQueue.TryPoll(TimeSpan.FromSeconds(5), out msg), Is.True, "expired at 5 seconds");
            Assert.That(msg, Is.Not.Null);
        }
Beispiel #2
0
        private Message ReceiveMessage(JID inJId, NUnit.Framework.Constraints.Constraint inMatcher)
        {
            Message result;

            Assert.That(mQueue.TryPoll(TimeSpan.FromSeconds(5), out result), Is.True, "5秒間に何らかのメッセージが送られてこなければならない");
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Body, inMatcher);
            Assert.That(result.From.ToString(), Is.EqualTo(inJId.ToString()));

            return(result);
        }