1 | // |
2 | // PriorityNotificationQueueTest.h |
3 | // |
4 | // Definition of the PriorityNotificationQueueTest class. |
5 | // |
6 | // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. |
7 | // and Contributors. |
8 | // |
9 | // SPDX-License-Identifier: BSL-1.0 |
10 | // |
11 | |
12 | |
13 | #ifndef PriorityNotificationQueueTest_INCLUDED |
14 | #define PriorityNotificationQueueTest_INCLUDED |
15 | |
16 | |
17 | #include "Poco/Foundation.h" |
18 | #include "Poco/CppUnit/TestCase.h" |
19 | #include "Poco/PriorityNotificationQueue.h" |
20 | #include "Poco/Mutex.h" |
21 | #include <set> |
22 | |
23 | |
24 | class PriorityNotificationQueueTest: public CppUnit::TestCase |
25 | { |
26 | public: |
27 | PriorityNotificationQueueTest(const std::string& name); |
28 | ~PriorityNotificationQueueTest(); |
29 | |
30 | void testQueueDequeue(); |
31 | void testWaitDequeue(); |
32 | void testThreads(); |
33 | void testDefaultQueue(); |
34 | |
35 | void setUp(); |
36 | void tearDown(); |
37 | |
38 | static CppUnit::Test* suite(); |
39 | |
40 | protected: |
41 | void work(); |
42 | |
43 | private: |
44 | Poco::PriorityNotificationQueue _queue; |
45 | std::multiset<std::string> _handled; |
46 | Poco::FastMutex _mutex; |
47 | }; |
48 | |
49 | |
50 | #endif // PriorityNotificationQueueTest_INCLUDED |
51 | |