fw: pull FaceTable construction out of Forwarder class
Refs: #4922, #4973
Change-Id: Ibbd4a8840cb0d01ebbd4cabf9c34fa78a1d23db1
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index 3ab261e..fa9d883 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -43,27 +43,25 @@
{
protected:
BestRouteStrategy2Fixture()
- : strategy(forwarder)
- , fib(forwarder.getFib())
- , pit(forwarder.getPit())
- , face1(make_shared<DummyFace>())
+ : face1(make_shared<DummyFace>())
, face2(make_shared<DummyFace>())
, face3(make_shared<DummyFace>())
, face4(make_shared<DummyFace>())
, face5(make_shared<DummyFace>())
{
- forwarder.addFace(face1);
- forwarder.addFace(face2);
- forwarder.addFace(face3);
- forwarder.addFace(face4);
- forwarder.addFace(face5);
+ faceTable.add(face1);
+ faceTable.add(face2);
+ faceTable.add(face3);
+ faceTable.add(face4);
+ faceTable.add(face5);
}
-public:
- Forwarder forwarder;
- BestRouteStrategy2Tester strategy;
- Fib& fib;
- Pit& pit;
+protected:
+ FaceTable faceTable;
+ Forwarder forwarder{faceTable};
+ BestRouteStrategy2Tester strategy{forwarder};
+ Fib& fib{forwarder.getFib()};
+ Pit& pit{forwarder.getPit()};
shared_ptr<DummyFace> face1;
shared_ptr<DummyFace> face2;