Adjust Session class and include close state in it.
[metaproxy-moved-to-github.git] / src / test_session1.cpp
1 #include "config.hpp"
2 #include "session.hpp"
3
4 #include <iostream>
5
6 #define BOOST_AUTO_TEST_MAIN
7 #include <boost/test/auto_unit_test.hpp>
8
9 using namespace boost::unit_test;
10
11 BOOST_AUTO_TEST_CASE( testsession1 ) 
12 {
13
14     // test session 
15     try {
16         yp2::Session session1;
17         yp2::Session session2;
18         yp2::Session session3;
19         yp2::Session session4;
20         yp2::Session session5;
21         unsigned long int id;
22         id = session5.id();
23
24         BOOST_CHECK (id == 5);
25         
26     }
27     catch (std::exception &e) {
28         std::cout << e.what() << "\n";
29         BOOST_CHECK (false);
30     }
31     catch (...) {
32         BOOST_CHECK (false);
33     }
34 }
35
36 /*
37  * Local variables:
38  * c-basic-offset: 4
39  * indent-tabs-mode: nil
40  * End:
41  * vim: shiftwidth=4 tabstop=8 expandtab
42  */