face: use NetworkMonitor::listNetworkInterfaces() in tests

refs #4021

Change-Id: I6daccc3872a0c6b2e2e49390bc5881c796503926
diff --git a/tests/daemon/face/tcp-channel.t.cpp b/tests/daemon/face/tcp-channel.t.cpp
index 986d471..d1a9626 100644
--- a/tests/daemon/face/tcp-channel.t.cpp
+++ b/tests/daemon/face/tcp-channel.t.cpp
@@ -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,
@@ -25,8 +25,7 @@
 
 #include "tcp-channel-fixture.hpp"
 
-#include "test-ip.hpp"
-
+#include "test-netif-ip.hpp"
 #include <boost/mpl/vector.hpp>
 
 namespace nfd {
@@ -36,16 +35,17 @@
 BOOST_AUTO_TEST_SUITE(Face)
 BOOST_FIXTURE_TEST_SUITE(TestTcpChannel, TcpChannelFixture)
 
-using AddressFamilies = boost::mpl::vector<boost::asio::ip::address_v4,
-                                           boost::asio::ip::address_v6>;
+using AddressFamilies = boost::mpl::vector<
+  std::integral_constant<AddressFamily, AddressFamily::V4>,
+  std::integral_constant<AddressFamily, AddressFamily::V6>>;
 
-BOOST_AUTO_TEST_CASE_TEMPLATE(ConnectTimeout, A, AddressFamilies)
+BOOST_AUTO_TEST_CASE_TEMPLATE(ConnectTimeout, F, AddressFamilies)
 {
-  auto address = getTestIp<A>(LoopbackAddress::Yes);
+  auto address = getTestIp<F::value>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   // do not listen
 
-  auto channel = this->makeChannel(A());
+  auto channel = this->makeChannel(typename IpAddressFromFamily<F::value>::type());
   channel->connect(tcp::Endpoint(address, 7040),
     ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false,
     [this] (const shared_ptr<nfd::Face>&) {