tests: use Signals from DummyClientFace

refs #2319

Change-Id: I688816fc58828a4f2d8fbad4936cc064816ab123
diff --git a/tests/unit/daemon/name-server.cpp b/tests/unit/daemon/name-server.cpp
index 09d192f..0e5f302 100644
--- a/tests/unit/daemon/name-server.cpp
+++ b/tests/unit/daemon/name-server.cpp
@@ -74,7 +74,7 @@
 
   bool hasDataBack = false;
 
-  face->onData += [&] (const Data& data) {
+  face->onSendData.connectSingleShot([&] (const Data& data) {
     hasDataBack = true;
     NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
@@ -82,7 +82,7 @@
     Response resp;
     BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RESP);
-  };
+  });
 
   face->receive(q.toInterest());
 
@@ -100,7 +100,7 @@
   size_t nDataBack = 0;
 
   // will ask for non-existing record
-  face->onData += [&] (const Data& data) {
+  face->onSendData.connectSingleShot([&] (const Data& data) {
     ++nDataBack;
     NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
@@ -108,14 +108,13 @@
     Response resp;
     BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_NACK);
-  };
+  });
 
   face->receive(q.toInterest());
   run();
 
   // will ask for the existing record (will have type NDNS_RAW, as it is certificate)
-  face->onData.clear();
-  face->onData += [&] (const Data& data) {
+  face->onSendData.connectSingleShot([&] (const Data& data) {
     ++nDataBack;
     NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
@@ -123,7 +122,7 @@
     Response resp;
     BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RAW);
-  };
+  });
 
   q.setRrLabel("dsk-1");
 
@@ -160,7 +159,7 @@
 
   bool hasDataBack = false;
 
-  face->onData += [&] (const Data& data) {
+  face->onSendData.connectSingleShot([&] (const Data& data) {
     hasDataBack = true;
     NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
@@ -177,7 +176,7 @@
     BOOST_CHECK_EQUAL(val->type(), ndns::tlv::UpdateReturnCode); // the first must be return code
     ret = readNonNegativeInteger(*val);
     BOOST_CHECK_EQUAL(ret, 0);
-  };
+  });
 
   face->receive(q.toInterest());
   run();
@@ -212,7 +211,7 @@
 
   bool hasDataBack = false;
 
-  face->onData += [&] (const Data& data) {
+  face->onSendData.connectSingleShot([&] (const Data& data) {
     hasDataBack = true;
     NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
@@ -229,7 +228,7 @@
     BOOST_CHECK_EQUAL(val->type(), ndns::tlv::UpdateReturnCode); // the first must be return code
     ret = readNonNegativeInteger(*val);
     BOOST_CHECK_EQUAL(ret, 0);
-  };
+  });
 
   face->receive(q.toInterest());
   run();
@@ -289,10 +288,10 @@
   bool hasDataBack = false;
 
   // no data back, since the Update cannot pass verification
-  face->onData += [&] (const Data& data) {
+  face->onSendData.connectSingleShot([&] (const Data& data) {
     hasDataBack = true;
     BOOST_FAIL("UNEXPECTED");
-  };
+  });
 
   face->receive(q.toInterest());
   run();
@@ -312,10 +311,10 @@
   {
     // ensure prefix is registered
     run();
-    validatorFace->onInterest += [&] (const Interest& interest) {
+    validatorFace->onSendInterest.connect([&] (const Interest& interest) {
       NDNS_LOG_TRACE("validatorFace get Interest: " << interest.getName());
       face->receive(interest);
-    };
+    });
   }
 
   void
@@ -387,7 +386,7 @@
   bool hasDataBack = false;
 
   shared_ptr<Regex> regex = make_shared<Regex>("(<>*)<KEY>(<>+)<ID-CERT><>");
-  face->onData += [&] (const Data& data) {
+  face->onSendData.connectSingleShot([&] (const Data& data) {
     if (regex->match(data.getName())) {
       validatorFace->receive(data); // It's data requested by validator
     }
@@ -410,7 +409,7 @@
       ret = readNonNegativeInteger(*val);
       BOOST_CHECK_EQUAL(ret, 0);
     }
-  };
+  });
 
   face->receive(q.toInterest());
   run();