RTXI  2.4
The Real-Time eXperiment Interface Documentation
event_tests.h
Go to the documentation of this file.
1 /*
2  The Real-Time eXperiment Interface (RTXI)
3  Copyright (C) 2011 Georgia Institute of Technology, University of Utah, Weill Cornell Medical College
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  */
19 
20 #ifndef EVENT_TESTS_H
21 #define EVENT_TESTS_H
22 
23 #include <gtest/gtest.h>
24 #include <gmock/gmock.h>
25 #include <rt.h>
26 #include <event.h>
27 
28 class EventObjectTest : public ::testing::Test
29 {
30 protected:
33 
35 };
36 
37 class EventManagerTest : public ::testing::Test
38 {
39 protected:
42 
45 };
46 
48 {
49 public:
50  MockEventObject(const char * n) : Event::Object(n) { }
52 
53  MOCK_METHOD(void *, getParam, (const char *), (const));
54  MOCK_METHOD(void, setParam, (const char *, void *), (const));
55  MOCK_METHOD(const char *, getName, (), (const));
56 };
57 
59 {
60 public:
61  MOCK_METHOD(void, receiveEvent, (const Event::Object *), (override));
62 };
63 
65 {
66 public:
67  MOCK_METHOD(void, receiveEventRT, (const Event::Object *), (override));
68 };
69 
70 #endif
EventObjectTest::event
Event::Object * event
Definition: event_tests.h:34
MockEventObject::~MockEventObject
~MockEventObject()
Definition: event_tests.h:51
MockEventObject::MOCK_METHOD
MOCK_METHOD(void *, getParam,(const char *),(const))
MockEventRTHandler
Definition: event_tests.h:64
Event::Object::getParam
void * getParam(const char *) const
Definition: event.cpp:81
Event::Handler::receiveEvent
virtual void receiveEvent(const Object *event)
Definition: event.cpp:60
EventManagerTest::event_manager
Event::Manager * event_manager
Definition: event_tests.h:43
EventObjectTest::~EventObjectTest
~EventObjectTest()
Definition: event_tests.h:32
Event::RTHandler
Definition: event.h:282
RT::System
Definition: rt.h:383
Event::Object::getName
const char * getName(void) const
Definition: event.h:141
Event::Manager
Definition: event.h:186
EventManagerTest::~EventManagerTest
~EventManagerTest()
Definition: event_tests.h:41
Event
Event Oriented Classes.
Definition: event.h:35
MockEventRTHandler::MOCK_METHOD
MOCK_METHOD(void, receiveEventRT,(const Event::Object *),(override))
MockEventHandler::MOCK_METHOD
MOCK_METHOD(void, receiveEvent,(const Event::Object *),(override))
EventManagerTest::EventManagerTest
EventManagerTest()
Definition: event_tests.h:40
EventManagerTest::system
RT::System * system
Definition: event_tests.h:44
Event::RTHandler::receiveEventRT
virtual void receiveEventRT(const Object *event)
Definition: event.cpp:72
EventManagerTest
Definition: event_tests.h:37
MockEventObject::MockEventObject
MockEventObject(const char *n)
Definition: event_tests.h:50
MockEventHandler
Definition: event_tests.h:58
event.h
Event::Handler
Definition: event.h:256
rt.h
EventObjectTest
Definition: event_tests.h:28
EventObjectTest::EventObjectTest
EventObjectTest()
Definition: event_tests.h:31
Event::Object
Definition: event.h:128
Event::Object::setParam
void setParam(const char *, void *)
Definition: event.cpp:89
MockEventObject
Definition: event_tests.h:47
Event::Object::Object
Object(const char *)
Definition: event.cpp:74