Пример #1
0
        public void TestProcessorQueue()
        {
            // setup classes
            var processor    = new Processor();
            var birthMessage = getSampleBirthMessage();
            var childMessage = getSampleChildBirthMessage();
            var messageList  = getSampleMessageArray();

            // test empty queue
            Assert.AreEqual(0, processor.QueueLength);

            // add birth message
            processor.AddMessage(birthMessage);

            // test queue
            Assert.AreEqual(1, processor.QueueLength);

            // add child message
            processor.AddMessage(childMessage);

            // test queue
            Assert.AreEqual(2, processor.QueueLength);

            // add message list
            processor.AddMessages(messageList);

            // test queue
            Assert.AreEqual(4, processor.QueueLength);
        }