Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Dec 7, 2023
1 parent 6b604b7 commit 9729f8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/v2i-hub/TelematicBridgePlugin/src/TelematicUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ namespace TelematicBridge
message[TESTING_TYPE_KEY] = testingType;
message[EVENT_NAME_KEY] = eventName;
message[TIMESTAMP_KEY] = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
Json::Value topics;
Json::Value topics = Json::arrayValue;
for (const auto &topic : availableTopicList)
{
if (!boost::icontains(excludedTopics, topic))
Expand Down
4 changes: 4 additions & 0 deletions src/v2i-hub/TelematicBridgePlugin/test/test_TelematicUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ namespace TelematicBridge
auto reply = TelematicUnit::constructAvailableTopicsReplyString(unit, eventLocation, testingType, eventName, topics, excluded_topic);
auto json = TelematicUnit::parseJson(reply);
ASSERT_EQ("test_topic", json["topics"][0]["name"].asString());

reply = TelematicUnit::constructAvailableTopicsReplyString(unit, eventLocation, testingType, eventName, {}, excluded_topic);
json = TelematicUnit::parseJson(reply);
ASSERT_EQ(1, json["topics"].isArray());
}

TEST_F(test_TelematicUnit, constructPublishedDataString)
Expand Down

0 comments on commit 9729f8a

Please sign in to comment.