Packageorg.puremvc.as3.multicore.utilities.pipes.plumbing
Classpublic class QueueTest
InheritanceQueueTest Inheritance flexunit.framework.TestCase

Test the Queue class.



Public Methods
 MethodDefined by
  
QueueTest(methodName:String)
Constructor.
QueueTest
  
suite():TestSuite
[static] Create the TestSuite.
QueueTest
  
Test connecting input and output pipes to a queue.
QueueTest
  
Test the Sort-by-Priority and FIFO modes.
QueueTest
  
Test writing multiple messages to the Queue followed by a Flush message.
QueueTest
Constructor detail
QueueTest()constructor
public function QueueTest(methodName:String)

Constructor.

Parameters
methodName:String — the name of the test method an instance to run
Method detail
suite()method
public static function suite():TestSuite

Create the TestSuite.

Returns
TestSuite
testConnectingIOPipes()method 
public function testConnectingIOPipes():void

Test connecting input and output pipes to a queue.

testSortByPriorityAndFIFO()method 
public function testSortByPriorityAndFIFO():void

Test the Sort-by-Priority and FIFO modes.

Creates messages to send to the queue, priorities unsorted. Creates queue, attaching an anonymous listener to its output. Sends SORT message to start sort-by-priority order mode. Writes messages to the queue. Sends FLUSH message, tests that messages were receieved in order of priority, not how they were sent.

Then sends a FIFO message to switch the queue back to default FIFO behavior, sends messages again, flushes again, tests that the messages were recieved and in the order they were originally sent.

testWritingMultipleMessagesAndFlush()method 
public function testWritingMultipleMessagesAndFlush():void

Test writing multiple messages to the Queue followed by a Flush message.

Creates messages to send to the queue. Creates queue, attaching an anonymous listener to its output. Writes messages to the queue. Tests that no messages have been received yet (they've been enqueued). Sends FLUSH message. Tests that messages were receieved, and in the order sent (FIFO).