unit-test: Introduce unit tests to phosphor-objmgr
Move a function to make more testable and add a test case for it
Testing: Verified 100% test coverage in processing.cpp
Change-Id: I0a888009cfeb57bbc8ad295681bea00b79f2a23d
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/src/processing.hpp b/src/processing.hpp
new file mode 100644
index 0000000..27ef4c6
--- /dev/null
+++ b/src/processing.hpp
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <boost/container/flat_map.hpp>
+#include <string>
+
+/** @brief Get well known name of input unique name
+ *
+ * If user passes in well known name then that will be returned.
+ *
+ * @param[in] owners - Current list of owners
+ * @param[in] request - The name to look up
+ * @param[out] wellKnown - The well known name if found
+ *
+ * @return True if well known name is found, false otherwise
+ */
+bool getWellKnown(
+ const boost::container::flat_map<std::string, std::string>& owners,
+ const std::string& request, std::string& wellKnown);