face: give ProtocolFactory access to NetworkMonitor

Subclasses of ProtocolFactory can access NetworkMonitor and
addFace callback anytime via member fields. They are supplied
to ProtocolFactory::create from FaceSystem.

This is in preparation for letting ProtocolFactory subclasses
react to fine-grained signals from NetworkMonitor.

refs #4021

Change-Id: I8da116bffc83d1bdeed7fd3b2e12c8872f19177b
diff --git a/tests/daemon/face/face-system-fixture.hpp b/tests/daemon/face/face-system-fixture.hpp
index 42ed02c..f1ea72c 100644
--- a/tests/daemon/face/face-system-fixture.hpp
+++ b/tests/daemon/face/face-system-fixture.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -32,6 +32,7 @@
 #include "fw/face-table.hpp"
 
 #include "tests/test-common.hpp"
+#include <ndn-cxx/net/network-monitor-stub.hpp>
 
 namespace nfd {
 namespace face {
@@ -43,7 +44,8 @@
 {
 public:
   FaceSystemFixture()
-    : faceSystem(faceTable)
+    : netmon(make_shared<ndn::net::NetworkMonitorStub>(~0))
+    , faceSystem(faceTable, netmon)
   {
     faceSystem.setConfigFile(configFile);
   }
@@ -107,6 +109,7 @@
 protected:
   ConfigFile configFile;
   FaceTable faceTable;
+  shared_ptr<ndn::net::NetworkMonitorStub> netmon;
   FaceSystem faceSystem;
 };