ADD: added tests

This commit is contained in:
Henry Winkel
2024-03-11 13:12:56 +01:00
parent ae7a65dff9
commit 453d3c27c4
2 changed files with 12 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ SCENARIO("Testing the SimCore Sensor")
track->setPosition(pos);
track->Speed.setValue(speed);
track->Course.setValue(course);
auto SensorTrack = std::make_shared<SimCore::SensorTrack>(track);
SimCore::SensorData Sensor1(SimCore::Identifier(),"ARPA","127.0.0.1", SimCore::SensorKinds::RADAR);
@@ -45,7 +46,7 @@ SCENARIO("Testing the SimCore Sensor")
WHEN("constructing Track Object with data")
{
List.addTrack(track);
List.addTrack(SensorTrack);
THEN("check if Track attributes are correct")
{
@@ -55,7 +56,7 @@ SCENARIO("Testing the SimCore Sensor")
REQUIRE(List.getTrack(id)->Course.getValue() == course);
// REQUIRE(List.getTrack(id)->getSensorCount() == 1);
track->Course.setValue(270);
List.addTrack(track);
List.addTrack(SensorTrack);
// REQUIRE(List.getTrack(id)->Course.getValue() == 270);
// REQUIRE(List.getTrack(id)->getSensorCount() == 2);
std::this_thread::sleep_for(std::chrono::milliseconds(3000));