core: Extend ConfigFile to support passing a parsed ConfigSection
Change-Id: I955220c08d8e6ed07c77d82149f6ff3ae48b2b12
Refs: #2495
diff --git a/tests/core/config-file.cpp b/tests/core/config-file.cpp
index 29689dd..7d3ddde 100644
--- a/tests/core/config-file.cpp
+++ b/tests/core/config-file.cpp
@@ -27,6 +27,7 @@
#include "tests/test-common.hpp"
#include <fstream>
+#include <boost/property_tree/info_parser.hpp>
namespace nfd {
namespace tests {
@@ -236,6 +237,18 @@
BOOST_CHECK(sub.noCallbacksFired());
}
+BOOST_AUTO_TEST_CASE(OnConfigSection)
+{
+ ConfigFile file;
+ DummyAllSubscriber sub(file);
+
+ std::istringstream input(CONFIG);
+ ConfigSection section;
+ boost::property_tree::read_info(input, section);
+
+ file.parse(section, false, "dummy-config");
+ BOOST_CHECK(sub.allCallbacksFired());
+}
BOOST_AUTO_TEST_CASE(OnConfigString)
{