test: dbus: passive read interface

Added basic unit-tests and added a factory for creating the
DbusPassive read interface so that it can be nicely error checked.  This
is handled via a valid type check where the only valid types are 'fan'
and 'temp'.

Change-Id: I558ed09bf509d26f20c6e431bb0789074e9aa841
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 4d78bc6..d8056e2 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -13,7 +13,8 @@
 # Run all 'check' test programs
 check_PROGRAMS = sensor_manager_unittest sensor_pluggable_unittest \
  sensor_host_unittest util_unittest pid_zone_unittest \
- pid_thermalcontroller_unittest pid_fancontroller_unittest
+ pid_thermalcontroller_unittest pid_fancontroller_unittest \
+ dbus_passive_unittest
 TESTS = $(check_PROGRAMS)
 
 # Until libconfig is mocked out or replaced, include it.
@@ -43,3 +44,7 @@
 pid_fancontroller_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \
  $(top_builddir)/pid/util.o $(top_builddir)/pid/controller.o \
  $(top_builddir)/pid/fancontroller.o
+
+dbus_passive_unittest_SOURCES = dbus_passive_unittest.cpp
+dbus_passive_unittest_LDADD = $(top_builddir)/dbus/util.o \
+ $(top_builddir)/dbus/dbuspassive.o