X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Ftests%2Fclasses%2FFakeConnectionObject.h;h=c5b446a5161c61cf3f2d1b4eb5a39266435a0269;hp=a72a993386296f6e027d3b9d6c126efee4a9604a;hb=ea5f276a69989d4e5797b49083322bac2c9a820c;hpb=674d18f3054c0530a53c9586f9c2effa4dc5dfcb diff --git a/source/tests/classes/FakeConnectionObject.h b/source/tests/classes/FakeConnectionObject.h index a72a993..c5b446a 100644 --- a/source/tests/classes/FakeConnectionObject.h +++ b/source/tests/classes/FakeConnectionObject.h @@ -25,7 +25,14 @@ class FakeConnectionObject : public ConnectionObject { public: - using ConnectionObject::ConnectionObject; + //using ConnectionObject::ConnectionObject; + + FakeConnectionObject(std::string ServerAddress, int ServerPort, std::string ServerUser, std::string ServerPass, bool ServerSSL); + FakeConnectionObject(std::string ServerAddress, int ServerPort, std::string ServerUser, std::string ServerPass, bool ServerSSL, std::string ServerPrefix, std::string ServerAccount); + + // Destructor. + + ~FakeConnectionObject(); // Functions for fake connection object. @@ -40,11 +47,17 @@ class FakeConnectionObject : public ConnectionObject { // Functions from the ConnectionObject interface. - COConnectResult Connect(); + void SetupConnectionObject(); + void BypassSSLVerification(bool EnableBypass); + COServerResponse GetDefaultPrefix(std::string *ServerPrefix); + COServerResponse GetContact(std::string Location, std::string *PageData); + std::string GetErrorMessage(); + SSLCertCollectionString BuildSSLCollection(); + 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 DeleteContact(std::string Location); COServerResponse GetServerEntityTagValue(std::string Location); COServerResponse GetContact(std::string Location); COContactList GetContactList(std::string SyncToken); @@ -72,14 +85,15 @@ class FakeConnectionObject : public ConnectionObject { bool ResultTaskCompleted = false; CORequestResult TestRequestResult; COContactList TestContactList; - std::string TestEntityTag; - int TestSessionCode; - int TestResultCode; - std::string TestResultMessage; + std::string TestEntityTag = ""; + int TestSessionCode = 0; + int TestResultCode = 0; + std::string TestResultMessage = ""; + bool ResultTestMode = false; protected: private: }; -#endif \ No newline at end of file +#endif