message: Add unit tests for message helper
diff: @@ -1026,6 +1026,38 @@ TEST_F(MessageHelperTest,
  std::find(status_array->begin(), status_array->end(), item_2_so));
  }
  #endif
  +
  +TEST_F(MessageHelperTest, SendNaviSetVideoConfigRequest) {
  + smart_objects::SmartObjectSPtr result;
  + EXPECT_CALL(mock_application_manager, ManageHMICommand(_))
  + .WillOnce(DoAll(SaveArg<0>(&result), Return(true)));
  +
  + int32_t app_id = 123;
  + smart_objects::SmartObject video_params(smart_objects::SmartType_Map);
  + video_params["protocol"] = hmi_apis::Common_VideoStreamingProtocol::RTP;
  + video_params["codec"] = hmi_apis::Common_VideoStreamingCodec::H264;
  + video_params["width"] = 640;
  + video_params["height"] = 480;
  +
  + MessageHelper::SendNaviSetVideoConfig(
  + app_id, mock_application_manager, video_params);
  +
  + EXPECT_EQ(hmi_apis::FunctionID::Navigation_SetVideoConfig,
  + (*result)[strings::params][strings::function_id].asInt());
  +
  + smart_objects::SmartObject& msg_params = (*result)[strings::msg_params];
  + EXPECT_TRUE(msg_params.keyExists("config"));
  +
  + EXPECT_TRUE(msg_params["config"].keyExists("protocol"));
  + EXPECT_EQ(1, msg_params["config"]["protocol"].asInt());
  + EXPECT_TRUE(msg_params["config"].keyExists("codec"));
  + EXPECT_EQ(0, msg_params["config"]["codec"].asInt());
  + EXPECT_TRUE(msg_params["config"].keyExists("width"));
  + EXPECT_EQ(640, msg_params["config"]["width"].asInt());
  + EXPECT_TRUE(msg_params["config"].keyExists("height"));
  + EXPECT_EQ(480, msg_params["config"]["height"].asInt());
  +}
  +
  } // namespace application_manager_test
  } // namespace components
  } // namespace test
  