77 lines
1.6 KiB
C++
77 lines
1.6 KiB
C++
|
|
|
|
#include "kubecontrol/PodController.hpp"
|
|
#include "nlohmann/json_fwd.hpp"
|
|
#include <fstream>
|
|
#include <memory>
|
|
#include <string>
|
|
#define CATCH_CONFIG_MAIN
|
|
#include "SimControl/PodList.hpp"
|
|
#include <catch2/catch.hpp>
|
|
#include <loguru.hpp>
|
|
|
|
#include "string.cpp"
|
|
|
|
// SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress
|
|
|
|
SCENARIO("Testing the the podlist")
|
|
{
|
|
|
|
auto control = kubecontrol::PodController("docs/config");
|
|
|
|
|
|
|
|
|
|
// std::ifstream ifs("info.json");
|
|
nlohmann::json j = nlohmann::json::parse(control.getPodsInfo());
|
|
|
|
LOG_S(INFO)<<control.getInfoForPod("simcontrol");
|
|
// LOG_S(INFO)<< j;
|
|
|
|
LOG_S(INFO)<<control.getPodsInfoForAll();
|
|
|
|
|
|
// SimControl::PodList podlist(j.dump());
|
|
|
|
|
|
// auto info = control.getInfoForPod("20939877-4c5e-4dbc-9f62-07533195334e");
|
|
// LOG_S(INFO)<<info;
|
|
// podlist.addPodToList(info);
|
|
// LOG_S(INFO)<<podlist.getPodTree("hamburg").dump();
|
|
|
|
|
|
// auto item1 = std::make_shared<SimControl::PodListItem>();
|
|
|
|
// auto item2 = std::make_shared<SimControl::PodListItem>();
|
|
// item2->Uuid= "movement";
|
|
|
|
|
|
// item1->Uuid= "test";
|
|
// item1->relatedPods.emplace_back(item2);
|
|
|
|
|
|
// podlist.addPodToList(item1);
|
|
// podlist.addPodToList(item2);
|
|
|
|
|
|
|
|
// LOG_S(INFO)<<podlist.getPodTree("test");
|
|
|
|
GIVEN("different Attributes for a Track in different forms")
|
|
{
|
|
|
|
WHEN("constructing Track Object with data")
|
|
{
|
|
|
|
THEN("check if Track attributes are correct")
|
|
{
|
|
// REQUIRE(podlist.size() == 2);
|
|
|
|
|
|
|
|
|
|
|
|
} //THEN
|
|
} // WHEN
|
|
} // GIVEN
|
|
} //SCENARIO
|