test for name and ccnx-wrapper
diff --git a/test/test-ccnx-name.cc b/test/test-ccnx-name.cc
index abab747..5084246 100644
--- a/test/test-ccnx-name.cc
+++ b/test/test-ccnx-name.cc
@@ -2,8 +2,6 @@
 #include "ccnx-name.h"
 
 #define BOOST_TEST_MAIN 1
-// #define BOOST_TEST_DYN_LINK
-// #define BOOST_TEST_Module Main
 
 #include <boost/test/unit_test.hpp>
 
@@ -18,11 +16,27 @@
   Name empty = Name();
   Name root = Name("/");
   BOOST_CHECK_EQUAL(empty, root);
+  BOOST_CHECK_EQUAL(empty, "/");
+  BOOST_CHECK_EQUAL(root.size(), 0);
+  empty.appendComp("hello");
+  empty.appendComp("world");
+  BOOST_CHECK_EQUAL(empty.size(), 2);
+  BOOST_CHECK_EQUAL(empty.toString(), "/hello/world");
+  empty = empty + root;
+  BOOST_CHECK_EQUAL(empty.toString(), "/hello/world");
+  BOOST_CHECK_EQUAL(empty.getCompAsString(0), "hello");
+  BOOST_CHECK_EQUAL(empty.getPartialName(1, 1), Name("/world"));
+  Name name("/hello/world");
+  BOOST_CHECK_EQUAL(empty, name);
+  BOOST_CHECK_EQUAL(name, Name("/hello") + Name("/world"));
+
+  // Charbuf related stuff will be checked in other place
 }
 
 BOOST_AUTO_TEST_CASE (SelectorsTest)
 {
-  int i = 0;
+  Selectors s;
+  BOOST_CHECK(s.isEmpty());
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/test/test-ccnx-wrapper.cc b/test/test-ccnx-wrapper.cc
new file mode 100644
index 0000000..4fe58d7
--- /dev/null
+++ b/test/test-ccnx-wrapper.cc
@@ -0,0 +1,60 @@
+#include "ccnx-wrapper.h"
+#include "ccnx-closure.h"
+#include "ccnx-name.h"
+#include "ccnx-pco.h"
+#include <unistd.h>
+
+#include <boost/test/unit_test.hpp>
+
+
+using namespace Ccnx;
+using namespace std;
+using namespace boost;
+
+BOOST_AUTO_TEST_SUITE(CcnxWrapperTests)
+
+CcnxWrapperPtr c1(new CcnxWrapper());
+CcnxWrapperPtr c2(new CcnxWrapper());
+
+void publish1(const Name &name)
+{
+  string content = name.toString();
+  c1->publishData(name, (const unsigned char*)content.c_str(), content.size(), 5);
+}
+
+void publish2(const Name &name)
+{
+  string content = name.toString();
+  c2->publishData(name, (const unsigned char*)content.c_str(), content.size(), 5);
+}
+
+void dataCallback(const Name &name, const Bytes &content)
+{
+  string msg((const char*)&content[0], content.size());
+  BOOST_CHECK_EQUAL(name, msg);
+}
+
+Closure::TimeoutCallbackReturnValue timeout(const Name &name)
+{
+  cout << "Timeout: "<< name;
+  return Closure::RESULT_OK;
+}
+
+BOOST_AUTO_TEST_CASE (CcnxWrapperTest)
+{
+  Name prefix1("/c1");
+  Name prefix2("/c2");
+
+  c1->setInterestFilter(prefix1, bind(publish1, _1));
+  c2->setInterestFilter(prefix2, bind(publish2, _1));
+
+  Closure *closure = new Closure(1, bind(dataCallback, _1, _2), bind(timeout, _1));
+
+  c1->sendInterest(Name("/c2/hi"), closure);
+  usleep(100000);
+  c2->sendInterest(Name("/c1/hi"), closure);
+  sleep(100000);
+  delete closure;
+}
+
+BOOST_AUTO_TEST_SUITE_END()