X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fclasses%2FFakeConnectionObject.cpp;h=4a348a56a5b58c60427f36402b70bfde6ec692b0;hb=cb31afce9cc7f778ed1519c8d3b17cce6f7bc1a3;hp=6e70fbfe82724b18f0bf9e8383b11045a2151d4c;hpb=e86dce6341aec3d350835e18c3791a644a313030;p=xestiaab%2F.git diff --git a/source/tests/classes/FakeConnectionObject.cpp b/source/tests/classes/FakeConnectionObject.cpp index 6e70fbf..4a348a5 100644 --- a/source/tests/classes/FakeConnectionObject.cpp +++ b/source/tests/classes/FakeConnectionObject.cpp @@ -18,7 +18,36 @@ #include "FakeConnectionObject.h" -COConnectResult FakeConnectionObject::Connect(){ +FakeConnectionObject::FakeConnectionObject(std::string ServerAddress, int ServerPort, + std::string ServerUser, std::string ServerPass, bool ServerSSL){ + + this->ServerAddress = ServerAddress; + this->ServerPort = ServerPort; + this->ServerUser = ServerUser; + this->ServerPass = ServerPass; + this->ServerSSL = ServerSSL; + +} + +FakeConnectionObject::FakeConnectionObject(std::string ServerAddress, int ServerPort, + std::string ServerUser, std::string ServerPass, bool ServerSSL, + std::string ServerPrefix, std::string ServerAccount){ + + this->ServerAddress = ServerAddress; + this->ServerPort = ServerPort; + this->ServerUser = ServerUser; + this->ServerPass = ServerPass; + this->ServerSSL = ServerSSL; + this->ServerPrefix = ServerPrefix; + this->ServerAccount = ServerAccount; + +} + +FakeConnectionObject::~FakeConnectionObject(){ + +} + +COConnectResult FakeConnectionObject::Connect(bool DoAuthentication){ COConnectResult ConnectResult = ResultStatus; AuthPassed = ResultAuthPassed; @@ -29,6 +58,12 @@ COConnectResult FakeConnectionObject::Connect(){ SSLSelfSigned = ResultSelfSigned; ServerPrefix = ResultServerPrefix; return ConnectResult; + +} + +bool FakeConnectionObject::IsTaskCompleted(){ + TaskCompleted = ResultTaskCompleted; + return TaskCompleted; } std::string FakeConnectionObject::GetDefaultPrefix(){ @@ -63,7 +98,7 @@ COServerResponse FakeConnectionObject::EditContact(std::string Location, std::st } -COServerResponse FakeConnectionObject::DeleteContact(std::string Location, std::string EntityTag){ +COServerResponse FakeConnectionObject::DeleteContact(std::string Location){ COServerResponse DeleteContactResult; @@ -148,7 +183,7 @@ bool FakeConnectionObject::GetServerSSL(){ } bool FakeConnectionObject::GetTestMode(){ - return TestMode; + return ResultTestMode; } bool FakeConnectionObject::CanDoProcessing(){ @@ -159,7 +194,7 @@ bool FakeConnectionObject::CanDoSSL(){ return SSLStatus; } -bool FakeConnectionObject::SSLVerify(){ +COSSLVerified FakeConnectionObject::SSLVerify(){ return SSLVerified; }