AuctionSniper.Test.FakeAuctionServer.ReceiveMessage C# (CSharp) Method

ReceiveMessage() private method

private ReceiveMessage ( jabber.JID inJId, NUnit inMatcher ) : Message
inJId jabber.JID
inMatcher NUnit
return jabber.protocol.client.Message
        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;
        }