shill: add MockIcmpSession, IcmpSessionFactory, and MockIcmpSessionFactory
Add MockIcmpSession class that allows for mocking of
IcmpSession function calls. Add an IcmpSessionFactory and
a corresponding Mock of this factory to allow IcmpSessions
that are dynamically allocated within a class implementation
to be mocked in unit tests.
A forthcoming CL will use these classes for testing.
BUG=None
TEST=Compiling shill for unit tests succeeds.
Change-Id: Ic327a19229d25146abf62f2228782b1826b186e7
Reviewed-on: https://chromium-review.googlesource.com/289954
Tested-by: Samuel Tan <samueltan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
diff --git a/shill.gyp b/shill.gyp
index 2ed344d..5fda972 100644
--- a/shill.gyp
+++ b/shill.gyp
@@ -532,6 +532,7 @@
'http_url.cc',
'icmp.cc',
'icmp_session.cc',
+ 'icmp_session_factory.cc',
'ip_address_store.cc',
'ipconfig.cc',
'ipconfig_dbus_adaptor.cc',
@@ -785,6 +786,8 @@
'mock_glib.cc',
'mock_http_request.cc',
'mock_icmp.cc',
+ 'mock_icmp_session.cc',
+ 'mock_icmp_session_factory.cc',
'mock_ip_address_store.cc',
'mock_ipconfig.cc',
'mock_link_monitor.cc',