Created ServiceData class for hardware analysis
This class will contain data for any service actions required during
analysis of the hardware errors.
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: I93f2c8113881510fff960f7428ee519e8a584938
diff --git a/test/service_data_test.cpp b/test/service_data_test.cpp
index 4f8505e..6939294 100644
--- a/test/service_data_test.cpp
+++ b/test/service_data_test.cpp
@@ -8,15 +8,17 @@
TEST(SericeData, TestSet1)
{
- HardwareCallout c1{"Test location 1", Callout::Priority::HIGH};
- HardwareCallout c2{"Test location 2", Callout::Priority::MED_A};
- ProcedureCallout c3{ProcedureCallout::NEXTLVL, Callout::Priority::LOW};
+ ServiceData sd{};
+
+ sd.addCallout(std::make_shared<HardwareCallout>("Test location 1",
+ Callout::Priority::HIGH));
+ sd.addCallout(std::make_shared<HardwareCallout>("Test location 2",
+ Callout::Priority::MED_A));
+ sd.addCallout(std::make_shared<ProcedureCallout>(ProcedureCallout::NEXTLVL,
+ Callout::Priority::LOW));
nlohmann::json j{};
-
- c1.getJson(j);
- c2.getJson(j);
- c3.getJson(j);
+ sd.getCalloutList(j);
// Create a RAW string containing what we should expect in the JSON output.
std::string s = R"([