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
ServomotorTest.cpp
00001 #include "gmock/gmock.h" 00002 #include "gtest/gtest.h" 00003 00004 #include "Servomotor.hpp" 00005 #include "mocks/MockPwmOut.hpp" 00006 00007 TEST(ServomotorTest, SetPositionDown) 00008 { 00009 MockPwmOut mock_pwm_out; 00010 Servomotor servomotor(mock_pwm_out); 00011 00012 EXPECT_CALL(mock_pwm_out, pulsewidth_us(500)) 00013 .Times(1); 00014 00015 servomotor.set_position_down(); 00016 } 00017 00018 TEST(ServomotorTest, SetPositionUp) 00019 { 00020 MockPwmOut mock_pwm_out; 00021 Servomotor servomotor(mock_pwm_out); 00022 00023 EXPECT_CALL(mock_pwm_out, pulsewidth_us(1500)) 00024 .Times(1); 00025 00026 servomotor.set_position_up(); 00027 } 00028
Generated on Thu Jul 14 2022 01:50:39 by
1.7.2
