RpcSessionTest.cc 601 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include <boost/bind.hpp>
  2. #include <boost/asio.hpp>
  3. #include <gtest/gtest.h>
  4. #include "Rpc/RpcSession.h"
  5. #include "Rpc/RpcServerMock.h"
  6. namespace Egametang {
  7. class RpcSessionTest: public testing::Test
  8. {
  9. protected:
  10. boost::asio::io_service ioService;
  11. int port;
  12. RpcServerMock mockServer;
  13. RpcSession session;
  14. public:
  15. RpcSessionTest():
  16. ioService(), port(10000),
  17. mockServer(ioService, port), session(ioService, mockServer)
  18. {
  19. }
  20. virtual ~RpcSessionTest()
  21. {
  22. }
  23. };
  24. } // namespace Egametang
  25. int main(int argc, char* argv[])
  26. {
  27. testing::InitGoogleTest(&argc, argv);
  28. return RUN_ALL_TESTS();
  29. }