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