libtasks Documentation  1.6
test_uwsgi_thrift.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2014 ADTECH GmbH
3  * Licensed under MIT (https://github.com/adtechlabs/libtasks/blob/master/COPYING)
4  *
5  * Author: Andreas Pohl
6  */
7 
8 #include <cppunit/TestCase.h>
9 #include <cppunit/TestFixture.h>
10 #include <cppunit/extensions/HelperMacros.h>
11 
12 #include <queue>
13 #include <vector>
14 
15 #include <IpService.h> // Thrift generated
16 
18 
19 class ip_service : public tasks::net::uwsgi_thrift_handler<IpServiceIf> {
20  public:
21  void lookup(response_type& result, const int32_t ipv4, const ipv6_type& ipv6);
22 };
23 
24 class test_uwsgi_thrift : public CppUnit::TestFixture {
28 
29  public:
30  void setUp() {}
31  void tearDown() {}
32 
33  protected:
34  void request();
35 
36  private:
37  std::unique_ptr<tasks::net_io_task> m_srv;
38 };
CPPUNIT_TEST(request)
CPPUNIT_TEST_SUITE(test_uwsgi_thrift)
std::unique_ptr< tasks::net_io_task > m_srv
void lookup(response_type &result, const int32_t ipv4, const ipv6_type &ipv6)
Definition: ip_service.cpp:15