Properly lock Z39.50 sessions
[metaproxy-moved-to-github.git] / src / test_filter_z3950_client.cpp
index cb07173..37f64a7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: test_filter_z3950_client.cpp,v 1.2 2005-10-16 16:09:58 adam Exp $
+/* $Id: test_filter_z3950_client.cpp,v 1.5 2005-10-26 10:55:26 marc Exp $
    Copyright (c) 2005, Index Data.
 
 %LICENSE%
@@ -10,7 +10,7 @@
 
 #include "filter_z3950_client.hpp"
 
-#include "router.hpp"
+#include "router_chain.hpp"
 #include "session.hpp"
 #include "package.hpp"
 
@@ -26,9 +26,7 @@ BOOST_AUTO_TEST_CASE( test_filter_z3950_client_1 )
 {
     try 
     {
-        {
-            yp2::filter::Z3950Client zc;
-        }
+        yp2::filter::Z3950Client zc; // can we construct OK?
     }
     catch ( ... ) {
         BOOST_CHECK (false);
@@ -43,7 +41,7 @@ BOOST_AUTO_TEST_CASE( test_filter_z3950_client_2 )
         
         yp2::filter::Z3950Client zc;
         
-        router.rule(zc);
+        router.append(zc);
         
         // Create package with Z39.50 init request in it
         yp2::Package pack;
@@ -59,7 +57,7 @@ BOOST_AUTO_TEST_CASE( test_filter_z3950_client_2 )
         // Put it in router
         pack.router(router).move(); 
         
-        // Inspect that we got Z39.50 init Response - a Z39.50 session
+        // Inspect that we got Z39.50 init Response - a Z39.50 session MUST
         // specify a virtual host
         yazpp_1::GDU *gdu = &pack.response();
         
@@ -85,7 +83,7 @@ BOOST_AUTO_TEST_CASE( test_filter_z3950_client_3 )
         
         yp2::filter::Z3950Client zc;
 
-        router.rule(zc);
+        router.append(zc);
         
         // Create package with Z39.50 present request in it
         yp2::Package pack;
@@ -127,7 +125,7 @@ BOOST_AUTO_TEST_CASE( test_filter_z3950_client_4 )
         
         yp2::filter::Z3950Client zc;
         
-        router.rule(zc);
+        router.append(zc);
         
         // Create package with Z39.50 init request in it
         yp2::Package pack;