filter factory in working shape, see example in test_filer_factory.cpp
[metaproxy-moved-to-github.git] / src / test_filter1.cpp
1 /* $Id: test_filter1.cpp,v 1.12 2005-10-29 22:23:36 marc Exp $
2    Copyright (c) 2005, Index Data.
3
4 %LICENSE%
5  */
6
7 #include "config.hpp"
8 #include <iostream>
9 #include <stdexcept>
10
11 #include "filter.hpp"
12
13 #define BOOST_AUTO_TEST_MAIN
14 #include <boost/test/auto_unit_test.hpp>
15
16 using namespace boost::unit_test;
17
18 class TFilter: public yp2::filter::Base {
19 public:
20     void process(yp2::Package & package) const {};
21     const std::string type() const {
22         return "TFilter";
23     };
24 };
25     
26
27 BOOST_AUTO_TEST_CASE( test_filter1 )
28 {
29     try{
30         TFilter filter;
31
32         
33         BOOST_CHECK (filter.type() == "TFilter");
34     }
35     catch ( ... ) {
36         BOOST_CHECK (false);
37     }
38 }
39
40 /*
41  * Local variables:
42  * c-basic-offset: 4
43  * indent-tabs-mode: nil
44  * c-file-style: "stroustrup"
45  * End:
46  * vim: shiftwidth=4 tabstop=8 expandtab
47  */