- Added unittest for `getUniqueQueue()`
- Typo fix
This commit is contained in:
Tristan B. Velloza Kildaire 2023-04-06 08:26:01 +02:00
parent 63698c0f87
commit 6b13303c9d
1 changed files with 20 additions and 1 deletions

View File

@ -349,7 +349,7 @@ unittest
}
/**
* tests registering a queue and then registering
* Tests registering a queue and then registering
* another queue with the same id
*/
unittest
@ -374,4 +374,23 @@ unittest
{
assert(e.getError() == ErrorType.QUEUE_ALREADY_EXISTS);
}
}
/**
* Tests registering a queue using the "next available queue"
* method
*/
unittest
{
/* Create a manager */
Manager manager = new Manager(null);
/* Get the next 3 available queues */
Queue queue1 = manager.getUniqueQueue();
Queue queue2 = manager.getUniqueQueue();
Queue queue3 = manager.getUniqueQueue();
assert(queue1.getID() == 0);
assert(queue2.getID() == 1);
assert(queue3.getID() == 2);
}