RpcSessionTest.cc 778 B

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