source: ThirdParty/CodePatterns/src/Observer/unittests/ObserverUnitTest.hpp@ 7516f6

Action_Thermostats Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChemicalSpaceEvaluator Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Exclude_Hydrogens_annealWithBondGraph Fix_Verbose_Codepatterns ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters Recreated_GuiChecks StoppableMakroAction TremoloParser_IncreasedPrecision
Last change on this file since 7516f6 was 41e8e2, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '084729c5923f0123e695fbe2548b393288c1f13d' as 'ThirdParty/CodePatterns'

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 * ObserverTest.hpp
3 *
4 * Created on: Jan 19, 2010
5 * Author: crueger
6 */
7
8#ifndef OBSERVERTEST_HPP_
9#define OBSERVERTEST_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include <cppunit/extensions/HelperMacros.h>
17
18// forward declaration for test stubs
19class UpdateCountObserver;
20class NotificationObserver;
21class SimpleObservable;
22class CallObservable;
23class SuperObservable;
24class ObservableSet;
25class ObservableMap;
26class RelayObservable;
27class BlockObservable;
28class NotificationObservable;
29class RelayCountObserver;
30class RelayNotification;
31class RelayNotificationObserver;
32
33class ObserverTest : public CppUnit::TestFixture
34{
35 CPPUNIT_TEST_SUITE( ObserverTest ) ;
36 CPPUNIT_TEST ( doesUpdateTest );
37 CPPUNIT_TEST ( doesBlockUpdateTest );
38 CPPUNIT_TEST ( doesSubObservableTest );
39 CPPUNIT_TEST ( outsideLockTest );
40 CPPUNIT_TEST ( doesNotifyTest );
41 CPPUNIT_TEST ( doesReportTest );
42 CPPUNIT_TEST ( iteratorTest );
43 CPPUNIT_TEST ( relayTest );
44 CPPUNIT_TEST ( relayNotificationTest );
45 CPPUNIT_TEST ( CircleDetectionTest );
46 CPPUNIT_TEST_SUITE_END();
47
48public:
49 void setUp();
50 void tearDown();
51
52 void doesUpdateTest();
53 void doesBlockUpdateTest();
54 void doesSubObservableTest();
55 void outsideLockTest();
56 void doesNotifyTest();
57 void doesReportTest();
58 void iteratorTest();
59 void relayTest();
60 void relayNotificationTest();
61 void CircleDetectionTest();
62
63private:
64 UpdateCountObserver *observer1;
65 UpdateCountObserver *observer2;
66 UpdateCountObserver *observer3;
67 UpdateCountObserver *observer4;
68
69 NotificationObserver *notificationObserver1;
70 NotificationObserver *notificationObserver2;
71
72 SimpleObservable *simpleObservable1;
73 SimpleObservable *simpleObservable2;
74 CallObservable *callObservable;
75 BlockObservable *blockObservable;
76 SuperObservable *superObservable;
77 NotificationObservable *notificationObservable;
78 ObservableSet *obsset;
79 ObservableMap *obsmap;
80 RelayTest *RelayObservable;
81 RelayCountObserver *RelayObserver;
82 RelayNotification *RelayNotifier;
83 RelayNotificationObserver *RelayNotified;
84};
85
86#endif /* OBSERVERTEST_HPP_ */
Note: See TracBrowser for help on using the repository browser.