Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: LedController mbed-rtos mbed NerfUSXbee Servomotor TargetManager
Fork of NerfUS by
TESTS/LedControllerTest.cpp
- Committer:
- Maxime Dupuis
- Date:
- 2017-03-11
- Revision:
- 25:0f2d698ecb3e
- Child:
- 27:3ae7c62008ea
File content as of revision 25:0f2d698ecb3e:
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "LedController.hpp"
#include "MockDigitalOut.hpp"
TEST(LedController, TurnOn)
{
MockDigitalOut mock_digital_out;
LedController led_controller(mock_digital_out);
EXPECT_CALL(mock_digital_out, write(1))
.Times(1);
led_controller.turn_on();
}
TEST(LedController, TurnOff)
{
MockDigitalOut mock_digital_out;
LedController led_controller(mock_digital_out);
EXPECT_CALL(mock_digital_out, write(0))
.Times(1);
led_controller.turn_off();
}
