mgmt: Initial fib manager with support for fib/add-nexthop
fw: Added FaceId to Face conversion method
Linked InternalFace's sendInterest to FibManager's
onFibRequest
refs: #1138
Change-Id: I0b18f2d41c9ba9d8749c586e3553b51a1e8b1269
diff --git a/tests/mgmt/internal-face.cpp b/tests/mgmt/internal-face.cpp
index 0ece5b6..861ca97 100644
--- a/tests/mgmt/internal-face.cpp
+++ b/tests/mgmt/internal-face.cpp
@@ -5,6 +5,9 @@
*/
#include "mgmt/internal-face.hpp"
+#include "mgmt/fib-manager.hpp"
+#include "table/fib.hpp"
+
#include <boost/test/unit_test.hpp>
@@ -12,16 +15,29 @@
BOOST_AUTO_TEST_SUITE(MgmtInternalFace)
+shared_ptr<Face>
+getFace(FaceId id)
+{
+ return shared_ptr<Face>();
+}
+
BOOST_AUTO_TEST_CASE(ValidPrefixRegistration)
{
- InternalFace internal;
- Interest regInterest("/localhost/nfd/prefixreg/hello/world");
+ Fib fib;
+ FibManager manager(fib, &getFace);
+ InternalFace internal(manager);
+
+ Name regName(manager.getRequestPrefix());
+ regName.append("hello").append("world");
+ Interest regInterest(regName);
internal.sendInterest(regInterest);
}
BOOST_AUTO_TEST_CASE(InvalidPrefixRegistration)
{
- InternalFace internal;
+ Fib fib;
+ FibManager manager(fib, &getFace);
+ InternalFace internal(manager);
Interest nonRegInterest("/hello/world");
internal.sendInterest(nonRegInterest);
}