npl: npls more conveniently instantiable

NPLs can now be instantiated using brace-init lists, as well as by passing
any iterator-capable container.

refs: #4345

Change-Id: Ib43373d5899d0ac14861027c34431fa928eec191
diff --git a/tests/test-lsa.cpp b/tests/test-lsa.cpp
index f15507d..f3eff5c 100644
--- a/tests/test-lsa.cpp
+++ b/tests/test-lsa.cpp
@@ -34,13 +34,10 @@
 
 BOOST_AUTO_TEST_CASE(NameLsaBasic)
 {
-  NamePrefixList npl1;
+  ndn::Name s1{"name1"};
+  ndn::Name s2{"name2"};
+  NamePrefixList npl1{s1, s2};
 
-  std::string s1 = "name1";
-  std::string s2 = "name2";
-
-  npl1.insert(s1);
-  npl1.insert(s2);
   ndn::time::system_clock::TimePoint testTimePoint =  ndn::time::system_clock::now();
 
   //3rd arg is seqNo. which will be a random number I just put in 12.
@@ -184,13 +181,9 @@
   BOOST_CHECK(adjlsa1.isEqualContent(adjlsa2));
 
   //Name LSA
-  NamePrefixList npl1;
-
-  std::string s1 = "name1";
-  std::string s2 = "name2";
-
-  npl1.insert(s1);
-  npl1.insert(s2);
+  ndn::Name s1{"name1"};
+  ndn::Name s2{"name2"};
+  NamePrefixList npl1{s1, s2};
 
   NameLsa nlsa1("router1", 1, testTimePoint, npl1);
   NameLsa nlsa2;