Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code and unit tests to FakeConnectionObject class
[xestiaab/.git] / source / tests / classes / FakeConnectionObject.cpp
index 02a20dc..147b01c 100644 (file)
 
 #include "FakeConnectionObject.h"
 
+COConnectResult FakeConnectionObject::Connect(){
+       
+       COConnectResult ConnectResult = ResultStatus;
+       AuthPassed = ResultAuthPassed;
+       CanProcess = ResultCanProcess;
+       SSLStatus = ResultSSLStatus;
+       SSLVerified = ResultSSLVerified;
+       ValidResponse = ResultValidResponse;
+       SSLSelfSigned = ResultSelfSigned;
+       ServerPrefix = ResultServerPrefix;
+       return ConnectResult;
+}
+
+std::string FakeConnectionObject::GetDefaultPrefix(){
+       return ServerPrefix;
+}
+
+COServerResponse FakeConnectionObject::AddContact(std::string Location, std::string Data){
+       
+       COServerResponse AddContactResult;
+       
+       AddContactResult.RequestResult = TestRequestResult;
+       AddContactResult.EntityTag = TestEntityTag;
+       AddContactResult.ResultCode = TestResultCode;
+       AddContactResult.ResultMessage = TestResultMessage;
+       
+       return AddContactResult;
+       
+}
+
 std::string FakeConnectionObject::GetServerAddress(){
        return ServerAddress;
 }
@@ -48,4 +78,28 @@ bool FakeConnectionObject::GetServerSSL(){
 
 bool FakeConnectionObject::GetTestMode(){
        return TestMode;
+}
+
+bool FakeConnectionObject::CanDoProcessing(){
+       return CanProcess;
+}
+
+bool FakeConnectionObject::CanDoSSL(){
+       return SSLStatus;       
+}
+
+bool FakeConnectionObject::SSLVerify(){
+       return SSLVerified;
+}
+
+bool FakeConnectionObject::AbleToLogin(){
+       return AuthPassed;
+}
+
+bool FakeConnectionObject::HasValidResponse(){
+       return ValidResponse;
+}
+
+bool FakeConnectionObject::IsSelfSigned(){
+       return SSLSelfSigned;
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy