FairMQ: Move static and interactive control modes to plugin (2)

This commit is contained in:
Alexey Rybalchenko
2017-09-14 12:42:07 +02:00
committed by Mohammad Al-Turany
parent 10f67e4c72
commit 334b91785b
15 changed files with 246 additions and 138 deletions

View File

@@ -34,6 +34,7 @@ TEST_F(PluginServices, OnlySingleController)
ASSERT_NO_THROW(mServices.ReleaseDeviceControl("foo"));
ASSERT_FALSE(mServices.GetDeviceController());
// take control implicitely
ASSERT_NO_THROW(mServices.TakeDeviceControl("foo"));
ASSERT_NO_THROW(mServices.ChangeDeviceState("foo", DeviceStateTransition::InitDevice));
EXPECT_EQ(mServices.GetDeviceController(), string{"foo"});
@@ -47,6 +48,7 @@ TEST_F(PluginServices, OnlySingleController)
TEST_F(PluginServices, Control)
{
ASSERT_EQ(mServices.GetCurrentDeviceState(), DeviceState::Idle);
ASSERT_NO_THROW(mServices.TakeDeviceControl("foo"));
ASSERT_NO_THROW(mServices.ChangeDeviceState("foo", DeviceStateTransition::InitDevice));
DeviceState nextState;