regulators: Add Services to ActionEnvironment
Add Services& services to the ActionEnvironment constructor.
Add Services& getServices() to the ActionEnvironment class.
Add Services& services to the ActionEnvironment class.
Update the ActionEnvironment test for the new getServices() method.
Update classes that create an ActionEnvironment.
Update all affected testcases that create an ActionEnvironment.
Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I12ac9f301746965aa282b69432a71ad525739c9e
diff --git a/phosphor-regulators/test/actions/not_action_tests.cpp b/phosphor-regulators/test/actions/not_action_tests.cpp
index 8e89862..97a6b61 100644
--- a/phosphor-regulators/test/actions/not_action_tests.cpp
+++ b/phosphor-regulators/test/actions/not_action_tests.cpp
@@ -17,6 +17,7 @@
#include "action_environment.hpp"
#include "id_map.hpp"
#include "mock_action.hpp"
+#include "mock_services.hpp"
#include "not_action.hpp"
#include <exception>
@@ -42,7 +43,8 @@
{
// Create ActionEnvironment
IDMap idMap{};
- ActionEnvironment env{idMap, ""};
+ MockServices services{};
+ ActionEnvironment env{idMap, "", services};
// Test where negated action throws an exception
try