X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fclasses%2FFakeConnectionObject.h;h=9c6d9c8655bc57f5f5af7b80aee96b3089765cec;hb=e41a3ab9dc4b2d35eaf76faf1a4160dd180e16e7;hp=c26bfd4db9970a54ac7e1bc4d0546414c8b033bd;hpb=4990d9a3913f961e2978c06ba97a8ea79622aa7a;p=xestiaab%2F.git diff --git a/source/tests/classes/FakeConnectionObject.h b/source/tests/classes/FakeConnectionObject.h index c26bfd4..9c6d9c8 100644 --- a/source/tests/classes/FakeConnectionObject.h +++ b/source/tests/classes/FakeConnectionObject.h @@ -16,15 +16,19 @@ // You should have received a copy of the GNU General Public License along // with Xestia Address Book. If not, see +#ifndef __CONNOBJECT_FAKECONNECTIONOBJECT_H__ +#define __CONNOBJECT_FAKECONNECTIONOBJECT_H__ + #include "../../connobject/ConnectionObject.h" class FakeConnectionObject : public ConnectionObject { public: - - // Functions for fake connection object. using ConnectionObject::ConnectionObject; + + // Functions for fake connection object. + std::string GetServerAddress(); unsigned int GetServerPort(); std::string GetServerUser(); @@ -36,20 +40,46 @@ class FakeConnectionObject : public ConnectionObject { // Functions from the ConnectionObject interface. - COConnectResult Connect(); + COConnectResult Connect(bool DoAuthentication); + std::string GetDefaultPrefix(); + COServerResponse AddContact(std::string Location, std::string Data); + COServerResponse EditContact(std::string Location, std::string Data); + COServerResponse DeleteContact(std::string Location, std::string EntityTag); + COServerResponse GetServerEntityTagValue(std::string Location); + COServerResponse GetContact(std::string Location); + COContactList GetContactList(std::string SyncToken); + + bool IsTaskCompleted(); + void SetupData(std::string Method, std::string Location, std::string Data); + bool CanDoProcessing(); bool CanDoSSL(); - bool SSLVerify(); + COSSLVerified SSLVerify(); bool AbleToLogin(); bool HasValidResponse(); bool IsSelfSigned(); // Variables to set for fake connection object. - std::string ServerPrefixInput = ""; - COConnectResult ResultStatus; + std::string ResultServerPrefix = ""; + COConnectResult ResultStatus = COCONNECT_UNITTESTFAIL; + bool ResultAuthPassed = false; + bool ResultCanProcess = false; + bool ResultSSLStatus = false; + COSSLVerified ResultSSLVerified = COSSL_NORESULT; + bool ResultValidResponse = false; + bool ResultSelfSigned = false; + bool ResultTaskCompleted = false; + CORequestResult TestRequestResult; + COContactList TestContactList; + std::string TestEntityTag; + int TestSessionCode; + int TestResultCode; + std::string TestResultMessage; protected: private: -}; \ No newline at end of file +}; + +#endif \ No newline at end of file