Apache.NMS.ActiveMQ.Test.SimplePriorityMessageDispatchChannelTest.TestEnqueue C# (CSharp) Method

TestEnqueue() private method

private TestEnqueue ( ) : void
return void
        public void TestEnqueue()
        {
            SimplePriorityMessageDispatchChannel channel = new SimplePriorityMessageDispatchChannel();
            MessageDispatch dispatch1 = new MessageDispatch();
            MessageDispatch dispatch2 = new MessageDispatch();

            Assert.IsTrue( channel.Empty == true );
            Assert.IsTrue( channel.Count == 0 );

            channel.Enqueue( dispatch1 );

            Assert.IsTrue( channel.Empty == false );
            Assert.IsTrue( channel.Count == 1 );

            channel.Enqueue( dispatch2 );

            Assert.IsTrue( channel.Empty == false );
            Assert.IsTrue( channel.Count == 2 );
        }