Test.cpp 651 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "Test.h"
  2. #include <iostream>
  3. #include "../../TestWalker/MSClient.h"
  4. ConnectTest::ConnectTest()
  5. {
  6. ok = 0;
  7. }
  8. void ConnectTest::init()
  9. {
  10. std::cout << "starting connection Test\n";
  11. }
  12. void ConnectTest::run()
  13. {
  14. MSClient msc;
  15. if( !msc.registerSSL() )
  16. {
  17. std::cerr << "client registration failed " __FILE__ ":" << __LINE__ << "\n";
  18. return;
  19. }
  20. // TODO
  21. if( !msc.unregister() )
  22. {
  23. std::cerr << "client unregistration failed " __FILE__ ":" << __LINE__ << "\n";
  24. return;
  25. }
  26. ok = 1;
  27. }
  28. bool ConnectTest::failed()
  29. {
  30. return !ok;
  31. }
  32. void ConnectTest::destroy()
  33. {
  34. delete this;
  35. }