NerfUS mobile node that manages a target for the Nerf gun firing range
Dependencies: LedController mbed-rtos mbed NerfUSXbee Servomotor TargetManager
Fork of NerfUS by
TESTS/TargetManagerTest.cpp
- Committer:
- Maxime Dupuis
- Date:
- 2017-03-27
- Revision:
- 31:c6dc9811ed14
- Parent:
- 30:412a779cf607
- Child:
- 32:50b777bab5a4
File content as of revision 31:c6dc9811ed14:
#include "gmock/gmock.h" #include "gtest/gtest.h" #include "mocks/MockNerfusTicker.hpp" #include "mocks/MockTarget.hpp" #include "TargetManager.hpp" class TargetManagerTest : public ::testing::Test { public: TargetManagerTest() { targets.push_back(&mock_target_a); targets.push_back(&mock_target_b); } MockTarget mock_target_a; MockTarget mock_target_b; std::vector<TargetInterface*> targets; MockNerfusTicker mock_nerfus_ticker; }; TEST_F(TargetManagerTest, LibraryBuilds) { TargetManager target_manager(targets, mock_nerfus_ticker); } TEST_F(TargetManagerTest, WhenNoTargetIsActiveThenCallsToTargetHitAndTargetMissedDoNothing) { TargetManager target_manager(targets, mock_nerfus_ticker); target_manager.target_missed(0); target_manager.target_hit(0); }