Mercurial > hg > orthanc-stone
diff UnitTestsSources/TestMessageBroker.cpp @ 258:e5a9b3d03478 am-2
first very basic version of SmartLoader
author | am@osimis.io |
---|---|
date | Tue, 10 Jul 2018 14:48:13 +0200 |
parents | 192e6e349e69 |
children | c9cf95b49a86 |
line wrap: on
line diff
--- a/UnitTestsSources/TestMessageBroker.cpp Tue Jul 10 12:39:01 2018 +0200 +++ b/UnitTestsSources/TestMessageBroker.cpp Tue Jul 10 14:48:13 2018 +0200 @@ -58,7 +58,7 @@ OrthancStone::IMessage genericMessage(OrthancStone::MessageType_Generic); // no observers have been registered -> nothing shall happen - observable.Emit(genericMessage); + observable.EmitMessage(genericMessage); ASSERT_EQ(0, globalCounter); @@ -66,20 +66,20 @@ MyObserver observer(broker); observable.RegisterObserver(observer); - observable.Emit(genericMessage); + observable.EmitMessage(genericMessage); ASSERT_EQ(1, globalCounter); // check the observer is not called when another message is issued OrthancStone::IMessage wrongMessage(OrthancStone::MessageType_GeometryReady); // no observers have been registered - observable.Emit(wrongMessage); + observable.EmitMessage(wrongMessage); ASSERT_EQ(1, globalCounter); // unregister the observer, make sure nothing happens afterwards observable.UnregisterObserver(observer); - observable.Emit(genericMessage); + observable.EmitMessage(genericMessage); ASSERT_EQ(1, globalCounter); } @@ -97,13 +97,13 @@ MyObserver observer(broker); observable.RegisterObserver(observer); - observable.Emit(genericMessage); + observable.EmitMessage(genericMessage); ASSERT_EQ(1, globalCounter); } // at this point, the observer has been deleted, the handle shall not be called again (and it shall not crash !) - observable.Emit(genericMessage); + observable.EmitMessage(genericMessage); ASSERT_EQ(1, globalCounter); }