Change discrete threshold value to string

For compliance with redfish schema, trigger with discrete
thresholds should use string as a value - instead of double.
This will impact dbus method "AddTrigger" for Trigger interface.
As there are currently no known sensors with discrete values,
telemetry service will still treat the value as a double internally.

Tested:
 - UT passed.
 - Trigger with discrete threshold value was successfully created
   using dbus call.
 - local redfish-tests for trigger persistency are passing after
   type modification.

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I8201ce5e2a45647206c5ccd85fc45ea8f32961af
diff --git a/tests/src/test_trigger.cpp b/tests/src/test_trigger.cpp
index cf7d96c..2336267 100644
--- a/tests/src/test_trigger.cpp
+++ b/tests/src/test_trigger.cpp
@@ -27,10 +27,10 @@
             .thresholdParams(std::vector<discrete::LabeledThresholdParam>{
                 discrete::LabeledThresholdParam{
                     "userId", discrete::Severity::warning,
-                    std::chrono::milliseconds(10).count(), 15.2},
+                    std::chrono::milliseconds(10).count(), "15.2"},
                 discrete::LabeledThresholdParam{
                     "userId_2", discrete::Severity::critical,
-                    std::chrono::milliseconds(5).count(), 32.7},
+                    std::chrono::milliseconds(5).count(), "32.7"},
             });
 
     std::unique_ptr<TriggerManagerMock> triggerManagerMockPtr =
@@ -341,13 +341,13 @@
     expectedItem0["userId"] = "userId";
     expectedItem0["severity"] = discrete::Severity::warning;
     expectedItem0["dwellTime"] = 10;
-    expectedItem0["thresholdValue"] = 15.2;
+    expectedItem0["thresholdValue"] = "15.2";
 
     nlohmann::json expectedItem1;
     expectedItem1["userId"] = "userId_2";
     expectedItem1["severity"] = discrete::Severity::critical;
     expectedItem1["dwellTime"] = 5;
-    expectedItem1["thresholdValue"] = 32.7;
+    expectedItem1["thresholdValue"] = "32.7";
 
     ASSERT_THAT(storedDiscreteConfiguration.at("ThresholdParamsDiscriminator"),
                 Eq(1));
diff --git a/tests/src/test_trigger_manager.cpp b/tests/src/test_trigger_manager.cpp
index 773b809..704c497 100644
--- a/tests/src/test_trigger_manager.cpp
+++ b/tests/src/test_trigger_manager.cpp
@@ -76,9 +76,9 @@
 {
     TriggerParams triggerParamsDiscrete;
     auto thresholds = std::vector<discrete::LabeledThresholdParam>{
-        {"discrete_threshold1", discrete::Severity::ok, 10, 11.0},
-        {"discrete_threshold2", discrete::Severity::warning, 10, 12.0},
-        {"discrete_threshold3", discrete::Severity::critical, 10, 13.0}};
+        {"discrete_threshold1", discrete::Severity::ok, 10, "11.0"},
+        {"discrete_threshold2", discrete::Severity::warning, 10, "12.0"},
+        {"discrete_threshold3", discrete::Severity::critical, 10, "13.0"}};
 
     triggerParamsDiscrete.thresholdParams(thresholds).isDiscrete(true);
 
@@ -230,8 +230,8 @@
 {
     LabeledTriggerThresholdParams thresholdParams =
         std::vector<discrete::LabeledThresholdParam>{
-            {"userId1", discrete::Severity::warning, 15, 10.0},
-            {"userId2", discrete::Severity::critical, 5, 20.0}};
+            {"userId1", discrete::Severity::warning, 15, "10.0"},
+            {"userId2", discrete::Severity::critical, 5, "20.0"}};
 
     data1["ThresholdParamsDiscriminator"] = thresholdParams.index();