Rename getPSUInventoryPath to getPSUInventoryPaths
Rename the utils method/function getPSUInventoryPath() to
getPSUInventoryPaths(). The method/function returns multiple paths in a
vector, so the name should be plural. This will make the return type
more clear. Currently the name implies only one path will be returned.
Tested:
* Verified all automated tests build and run successfully
* Verified getPSUInventoryPaths() returns correct data
Change-Id: I7e215c37e3ce1eb27313bc51348c7f7335c8f67a
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
diff --git a/test/test_item_updater.cpp b/test/test_item_updater.cpp
index ad01f42..7523bfc 100644
--- a/test/test_item_updater.cpp
+++ b/test/test_item_updater.cpp
@@ -83,7 +83,7 @@
constexpr auto service = "com.example.Software.Psu";
constexpr auto version = "version0";
std::string objPath = getObjPath(version);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psuPath})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psuPath), _))
.WillOnce(Return(service));
@@ -107,7 +107,7 @@
constexpr auto service = "com.example.Software.Psu";
constexpr auto version = "version0";
std::string objPath = getObjPath(version);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psuPath})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psuPath), _))
.WillOnce(Return(service));
@@ -139,7 +139,7 @@
auto objPath0 = getObjPath(version0);
auto objPath1 = getObjPath(version1);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psu0, psu1})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psu0), _))
.WillOnce(Return(service));
@@ -189,7 +189,7 @@
auto objPath0 = getObjPath(version0);
auto objPath1 = getObjPath(version1);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psu0, psu1})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psu0), _))
.WillOnce(Return(service));
@@ -241,7 +241,7 @@
constexpr auto service = "com.example.Software.Psu";
constexpr auto version = "version0";
std::string objPath = getObjPath(version);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psuPath})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psuPath), _))
.WillOnce(Return(service));
@@ -279,7 +279,7 @@
constexpr auto service = "com.example.Software.Psu";
constexpr auto version = "version0";
std::string objPath = getObjPath(version);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psuPath})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psuPath), _))
.WillOnce(Return(service));
@@ -313,7 +313,7 @@
constexpr auto service = "com.example.Software.Psu";
constexpr auto version = "version0";
std::string objPath = getObjPath(version);
- ON_CALL(mockedUtils, getPSUInventoryPath(_))
+ ON_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillByDefault(Return(std::vector<std::string>({psuPath})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psuPath), _))
.WillOnce(Return(service));
@@ -375,7 +375,7 @@
auto objPath0 = getObjPath(version0);
auto objPath1 = getObjPath(version1);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psu0, psu1})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psu0), _))
.WillOnce(Return(service));
@@ -458,7 +458,7 @@
constexpr auto service = "com.example.Software.Psu";
constexpr auto version = "version0";
std::string objPath = getObjPath(version);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psuPath})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psuPath), _))
.WillOnce(Return(service));
@@ -492,7 +492,7 @@
constexpr auto service = "com.example.Software.Psu";
constexpr auto version = "version0";
std::string objPath = getObjPath(version);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psuPath})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psuPath), _))
.WillOnce(Return(service));
@@ -538,7 +538,7 @@
auto objPath0 = getObjPath(version0);
auto objPath1 = getObjPath(version1);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psu0, psu1})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psu0), _))
.WillOnce(Return(service));
@@ -606,7 +606,7 @@
auto objPath0 = getObjPath(version0);
auto objPath1 = getObjPath(version1);
- EXPECT_CALL(mockedUtils, getPSUInventoryPath(_))
+ EXPECT_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillOnce(Return(std::vector<std::string>({psu0, psu1})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psu0), _))
.WillOnce(Return(service));
@@ -665,7 +665,7 @@
std::string versionId =
version; // In testing versionId is the same as version
std::string objPath = getObjPath(version);
- ON_CALL(mockedUtils, getPSUInventoryPath(_))
+ ON_CALL(mockedUtils, getPSUInventoryPaths(_))
.WillByDefault(Return(std::vector<std::string>({psuPath})));
EXPECT_CALL(mockedUtils, getService(_, StrEq(psuPath), _))
.WillOnce(Return(service))