Changeset 74e0f7 for src/Patterns/unittests/ObserverUnitTest.cpp
- Timestamp:
- Sep 1, 2011, 11:07:47 AM (14 years ago)
- Children:
- 9e776f
- Parents:
- 451f17
- git-author:
- Frederik Heber <heber@…> (09/01/11 11:02:49)
- git-committer:
- Frederik Heber <heber@…> (09/01/11 11:07:47)
- File:
-
- 1 edited
-
src/Patterns/unittests/ObserverUnitTest.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Patterns/unittests/ObserverUnitTest.cpp
r451f17 r74e0f7 61 61 observer4 = new UpdateCountObserver(); 62 62 63 notificationObserver1 = new NotificationObserver(notificationObservable->notification1); 64 notificationObserver2 = new NotificationObserver(notificationObservable->notification2); 63 notificationObserver1 = new NotificationObserver( 64 notificationObservable->getChannel(NotificationObservable::Operation1Notify)); 65 notificationObserver2 = new NotificationObserver( 66 notificationObservable->getChannel(NotificationObservable::Operation2Notify)); 65 67 } 66 68 … … 157 159 158 160 void ObserverTest::doesNotifyTest(){ 161 CPPUNIT_ASSERT_EQUAL( 162 (size_t)NotificationObservable::Operation1Notify, 163 notificationObservable->getChannel(NotificationObservable::Operation1Notify)->getChannelNo()); 164 CPPUNIT_ASSERT_EQUAL( 165 (size_t)NotificationObservable::Operation2Notify, 166 notificationObservable->getChannel(NotificationObservable::Operation2Notify)->getChannelNo()); 159 167 notificationObservable->signOn(notificationObserver1, 160 notificationObservable-> notification1);168 notificationObservable->getChannel(NotificationObservable::Operation1Notify)); 161 169 notificationObservable->signOn(notificationObserver2, 162 notificationObservable-> notification2);170 notificationObservable->getChannel(NotificationObservable::Operation2Notify)); 163 171 164 172 notificationObservable->operation1();
Note:
See TracChangeset
for help on using the changeset viewer.
