#include "Test.h"
#include <iostream>
#include "../../TestWalker/MSClient.h"

ConnectTest::ConnectTest()
{
    ok = 0;
}

void ConnectTest::init()
{
    std::cout << "starting connection Test\n";
}

void ConnectTest::run()
{
    MSClient msc;
    if( !msc.registerSSL() )
    {
        std::cerr << "client registration failed " __FILE__ ":" << __LINE__ << "\n";
        return;
    }
    // TODO
    if( !msc.unregister() )
    {
        std::cerr << "client unregistration failed " __FILE__ ":" << __LINE__ << "\n";
        return;
    }
    ok = 1;
}

bool ConnectTest::failed()
{
    return !ok;
}

void ConnectTest::destroy()
{
    delete this;
}