enable unit-tests: enable for SensorManager

Enabled unit-tests in general for the project, and more
specifically started with a benign construction test for
the SensorManager object.

Tested: Verified continues to build and link, and unit-test
passes.
Tested: Ran on quanta-q71l board and it behaved as expected.

Change-Id: I4ad9a0c57efd0b9ccc37d26faa0cc1b82026b8d7
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index ea93a96..738ab91 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -12,5 +12,9 @@
 	$(PHOSPHOR_DBUS_INTERFACES_LIBS)
 
 # Run all 'check' test programs
-check_PROGRAMS =
+check_PROGRAMS = sensor_manager_unittest
 TESTS = $(check_PROGRAMS)
+
+# Until libconfig is mocked out or replaced, include it.
+sensor_manager_unittest_SOURCES = sensor_manager_unittest.cpp
+sensor_manager_unittest_LDADD = $(top_builddir)/sensors/manager.o
diff --git a/test/sensor_manager_unittest.cpp b/test/sensor_manager_unittest.cpp
new file mode 100644
index 0000000..17ccffa
--- /dev/null
+++ b/test/sensor_manager_unittest.cpp
@@ -0,0 +1,28 @@
+#include "sensors/manager.hpp"
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+#include <sdbusplus/test/sdbus_mock.hpp>
+
+using ::testing::_;
+using ::testing::IsNull;
+using ::testing::Return;
+using ::testing::StrEq;
+
+TEST(SensorManagerTest, BoringConstructorTest) {
+    // Build a boring SensorManager.
+
+    sdbusplus::SdBusMock sdbus_mock_passive, sdbus_mock_host;
+    auto bus_mock_passive = sdbusplus::get_mocked_new(&sdbus_mock_passive);
+    auto bus_mock_host = sdbusplus::get_mocked_new(&sdbus_mock_host);
+
+    EXPECT_CALL(sdbus_mock_host,
+                sd_bus_add_object_manager(
+                    IsNull(),
+                    _,
+                    StrEq("/xyz/openbmc_project/extsensors")))
+    .WillOnce(Return(0));
+
+    SensorManager s(std::move(bus_mock_passive), std::move(bus_mock_host));
+    // Success
+}