ctkEventDispatcherRemoteTest.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * ctkEventDispatcherRemoteTest.cpp
  3. * ctkEventBusTest
  4. *
  5. * Created by Daniele Giunchi on 20/04/10.
  6. * Copyright 2009 B3C. All rights reserved.
  7. *
  8. * See Licence at: http://tiny.cc/QXJ4D
  9. *
  10. */
  11. #include "ctkTestSuite.h"
  12. #include <ctkEventDispatcherRemote.h>
  13. using namespace ctkEventBus;
  14. /**
  15. Class name: ctkEventDispatcherRemoteTest
  16. This class implements the test suite for ctkEventDispatcherRemote.
  17. */
  18. //! <title>
  19. //ctkEventDispatcherRemote
  20. //! </title>
  21. //! <description>
  22. //ctkEventDispatcherRemote allows dispatching events coming from local
  23. // application to attached observers.
  24. //! </description>
  25. class ctkEventDispatcherRemoteTest : public QObject {
  26. Q_OBJECT
  27. private Q_SLOTS:
  28. /// Initialize test variables
  29. void initTestCase() {
  30. m_EventDispatcherRemote = new ctkEventDispatcherRemote();
  31. }
  32. /// Cleanup test variables memory allocation.
  33. void cleanupTestCase() {
  34. delete m_EventDispatcherRemote;
  35. }
  36. /// ctkEventDispatcherRemote allocation test case.
  37. void ctkEventDispatcherRemoteAllocationTest();
  38. /// ctkEventDispatcherRemote accessors test case: test client and server pointers.
  39. void ctkEventDispatcherRemoteAccessorsTest();
  40. private:
  41. ctkEventDispatcherRemote *m_EventDispatcherRemote; ///< Test var.
  42. };
  43. void ctkEventDispatcherRemoteTest::ctkEventDispatcherRemoteAllocationTest() {
  44. QVERIFY(m_EventDispatcherRemote != NULL);
  45. }
  46. void ctkEventDispatcherRemoteTest::ctkEventDispatcherRemoteAccessorsTest() {
  47. QVERIFY(m_EventDispatcherRemote->networkConnectorClient() == NULL);
  48. QVERIFY(m_EventDispatcherRemote->networkConnectorServer() == NULL);
  49. }
  50. CTK_REGISTER_TEST(ctkEventDispatcherRemoteTest);
  51. #include "ctkEventDispatcherRemoteTest.moc"