Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
674d18f
)
Changed ConnectionObject and updated unit tests accordingly.
author
Steve Brokenshire
<sbrokenshire@xestia.co.uk>
Sun, 14 Aug 2016 08:17:26 +0000
(09:17 +0100)
committer
Steve Brokenshire
<sbrokenshire@xestia.co.uk>
Sun, 14 Aug 2016 08:17:26 +0000
(09:17 +0100)
source/connobject/ConnectionObject.cpp
patch
|
blob
|
history
source/connobject/ConnectionObject.h
patch
|
blob
|
history
source/tests/classes/FakeConnectionObject.cpp
patch
|
blob
|
history
source/tests/classes/FakeConnectionObject.h
patch
|
blob
|
history
source/tests/xestiaab_carddav.cpp
patch
|
blob
|
history
diff --git
a/source/connobject/ConnectionObject.cpp
b/source/connobject/ConnectionObject.cpp
index
9e2e202
..
830c432
100644
(file)
--- a/
source/connobject/ConnectionObject.cpp
+++ b/
source/connobject/ConnectionObject.cpp
@@
-24,6
+24,7
@@
ConnectionObject::ConnectionObject(string ServerAddress, int ServerPort, string
ServerAddress(ServerAddress), ServerPort(ServerPort), ServerUser(ServerUser), ServerPass(ServerPass), ServerSSL(ServerSSL){
TestMode = true;
ServerAddress(ServerAddress), ServerPort(ServerPort), ServerUser(ServerUser), ServerPass(ServerPass), ServerSSL(ServerSSL){
TestMode = true;
+ this->SetupConnectionObject();
}
}
@@
-31,5
+32,6
@@
ConnectionObject::ConnectionObject(string ServerAddress, int ServerPort, string
ServerAddress(ServerAddress), ServerPort(ServerPort), ServerUser(ServerUser), ServerPass(ServerPass), ServerSSL(ServerSSL), ServerPrefix(ServerPrefix), ServerAccount(ServerAccount){
TestMode = false;
ServerAddress(ServerAddress), ServerPort(ServerPort), ServerUser(ServerUser), ServerPass(ServerPass), ServerSSL(ServerSSL), ServerPrefix(ServerPrefix), ServerAccount(ServerAccount){
TestMode = false;
-
+ this->SetupConnectionObject();
+
}
}
diff --git
a/source/connobject/ConnectionObject.h
b/source/connobject/ConnectionObject.h
index
9ffbe4d
..
4ba84b8
100644
(file)
--- a/
source/connobject/ConnectionObject.h
+++ b/
source/connobject/ConnectionObject.h
@@
-21,10
+21,12
@@
#include <string>
#include <vector>
#include <string>
#include <vector>
+#include <iostream>
enum COConnectResult {
COCONNECT_UNITTESTFAIL = -1,
COCONNECT_OK,
enum COConnectResult {
COCONNECT_UNITTESTFAIL = -1,
COCONNECT_OK,
+ COCONNECT_SSLFAIL,
COCONNECT_INVALID,
COCONNECT_TIMEOUT,
COCONNECT_AUTHFAIL
COCONNECT_INVALID,
COCONNECT_TIMEOUT,
COCONNECT_AUTHFAIL
@@
-73,12
+75,12
@@
class ConnectionObject{
// Virtual functions to be setup by the inheriting classes.
// Virtual functions to be setup by the inheriting classes.
- virtual void SetupConnectionObject() {};
+ virtual void SetupConnectionObject() {
};
//virtual ~ConnectionObject() {};
virtual bool IsTaskCompleted() {};
//virtual ~ConnectionObject() {};
virtual bool IsTaskCompleted() {};
- virtual COConnectResult Connect() {};
+ virtual COConnectResult Connect(
bool DoAuthentication
) {};
virtual std::string GetDefaultPrefix() {};
virtual COServerResponse AddContact(std::string Location, std::string Data) {};
virtual std::string GetDefaultPrefix() {};
virtual COServerResponse AddContact(std::string Location, std::string Data) {};
@@
-93,6
+95,8
@@
class ConnectionObject{
virtual COSSLVerified SSLVerify() {};
virtual bool AbleToLogin() {};
virtual bool HasValidResponse() {};
virtual COSSLVerified SSLVerify() {};
virtual bool AbleToLogin() {};
virtual bool HasValidResponse() {};
+ virtual bool IsSelfSigned() {};
+ virtual std::string GetErrorMessage() {};
protected:
// Test Mode.
protected:
// Test Mode.
@@
-109,7
+113,6
@@
class ConnectionObject{
std::string ServerAccount = "";
bool ServerSSL = true;
std::string ErrorMessage = "";
std::string ServerAccount = "";
bool ServerSSL = true;
std::string ErrorMessage = "";
- std::string ErrorBufferMessage = "";
// Connect results.
// Connect results.
diff --git
a/source/tests/classes/FakeConnectionObject.cpp
b/source/tests/classes/FakeConnectionObject.cpp
index
7257640
..
7eaffbb
100644
(file)
--- a/
source/tests/classes/FakeConnectionObject.cpp
+++ b/
source/tests/classes/FakeConnectionObject.cpp
@@
-18,7
+18,7
@@
#include "FakeConnectionObject.h"
#include "FakeConnectionObject.h"
-COConnectResult FakeConnectionObject::Connect(){
+COConnectResult FakeConnectionObject::Connect(
bool DoAuthentication
){
COConnectResult ConnectResult = ResultStatus;
AuthPassed = ResultAuthPassed;
COConnectResult ConnectResult = ResultStatus;
AuthPassed = ResultAuthPassed;
@@
-29,6
+29,7
@@
COConnectResult FakeConnectionObject::Connect(){
SSLSelfSigned = ResultSelfSigned;
ServerPrefix = ResultServerPrefix;
return ConnectResult;
SSLSelfSigned = ResultSelfSigned;
ServerPrefix = ResultServerPrefix;
return ConnectResult;
+
}
bool FakeConnectionObject::IsTaskCompleted(){
}
bool FakeConnectionObject::IsTaskCompleted(){
@@
-174,8
+175,4
@@
bool FakeConnectionObject::AbleToLogin(){
bool FakeConnectionObject::HasValidResponse(){
return ValidResponse;
bool FakeConnectionObject::HasValidResponse(){
return ValidResponse;
-}
-
-bool FakeConnectionObject::IsSelfSigned(){
- return SSLSelfSigned;
}
\ No newline at end of file
}
\ No newline at end of file
diff --git
a/source/tests/classes/FakeConnectionObject.h
b/source/tests/classes/FakeConnectionObject.h
index
a72a993
..
9c6d9c8
100644
(file)
--- a/
source/tests/classes/FakeConnectionObject.h
+++ b/
source/tests/classes/FakeConnectionObject.h
@@
-40,7
+40,7
@@
class FakeConnectionObject : public ConnectionObject {
// Functions from the ConnectionObject interface.
// 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);
std::string GetDefaultPrefix();
COServerResponse AddContact(std::string Location, std::string Data);
COServerResponse EditContact(std::string Location, std::string Data);
diff --git
a/source/tests/xestiaab_carddav.cpp
b/source/tests/xestiaab_carddav.cpp
index
2ef1225
..
b5e7a6d
100644
(file)
--- a/
source/tests/xestiaab_carddav.cpp
+++ b/
source/tests/xestiaab_carddav.cpp
@@
-126,7
+126,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_Returning_Success){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultStatus = COCONNECT_OK;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultStatus = COCONNECT_OK;
- EXPECT_EQ(COCONNECT_OK, FakeConnection.Connect());
+ EXPECT_EQ(COCONNECT_OK, FakeConnection.Connect(
false
));
}
}
@@
-139,7
+139,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_Returning_InvalidAddress){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultStatus = COCONNECT_INVALID;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultStatus = COCONNECT_INVALID;
- EXPECT_EQ(COCONNECT_INVALID, FakeConnection.Connect());
+ EXPECT_EQ(COCONNECT_INVALID, FakeConnection.Connect(
false
));
}
}
@@
-152,7
+152,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_Returning_Timeout){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultStatus = COCONNECT_TIMEOUT;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultStatus = COCONNECT_TIMEOUT;
- EXPECT_EQ(COCONNECT_TIMEOUT, FakeConnection.Connect());
+ EXPECT_EQ(COCONNECT_TIMEOUT, FakeConnection.Connect(
false
));
}
}
@@
-165,7
+165,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_Returning_Authentication_Failure
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultStatus = COCONNECT_AUTHFAIL;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultStatus = COCONNECT_AUTHFAIL;
- EXPECT_EQ(COCONNECT_AUTHFAIL, FakeConnection.Connect());
+ EXPECT_EQ(COCONNECT_AUTHFAIL, FakeConnection.Connect(
false
));
}
}
@@
-177,7
+177,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Is_Able_To_Login){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultAuthPassed = true;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultAuthPassed = true;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(true, FakeConnection.AbleToLogin());
EXPECT_EQ(true, FakeConnection.AbleToLogin());
@@
-191,7
+191,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Is_Unable_To_Login){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultAuthPassed = false;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultAuthPassed = false;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(false, FakeConnection.AbleToLogin());
EXPECT_EQ(false, FakeConnection.AbleToLogin());
@@
-205,7
+205,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Can_Do_Processing){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultCanProcess = true;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultCanProcess = true;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(true, FakeConnection.CanDoProcessing());
EXPECT_EQ(true, FakeConnection.CanDoProcessing());
@@
-219,7
+219,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Supports_SSL){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLStatus = true;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLStatus = true;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(true, FakeConnection.CanDoSSL());
EXPECT_EQ(true, FakeConnection.CanDoSSL());
@@
-233,7
+233,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Does_Not_Support_SSL){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLStatus = false;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLStatus = false;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(false, FakeConnection.CanDoSSL());
EXPECT_EQ(false, FakeConnection.CanDoSSL());
@@
-247,7
+247,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Has_Valid_SSL_Certificate_D
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLVerified = COSSL_VERIFIED;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLVerified = COSSL_VERIFIED;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(COSSL_VERIFIED, FakeConnection.SSLVerify());
EXPECT_EQ(COSSL_VERIFIED, FakeConnection.SSLVerify());
@@
-261,8
+261,9
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Has_Invalid_SSL_Certificate
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLVerified = COSSL_UNABLETOVERIFY;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLVerified = COSSL_UNABLETOVERIFY;
- FakeConnection.
Connect()
;
+ FakeConnection.
ResultStatus = COCONNECT_SSLFAIL
;
+ EXPECT_EQ(COCONNECT_SSLFAIL, FakeConnection.Connect(false));
EXPECT_EQ(COSSL_UNABLETOVERIFY, FakeConnection.SSLVerify());
}
EXPECT_EQ(COSSL_UNABLETOVERIFY, FakeConnection.SSLVerify());
}
@@
-275,7
+276,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Has_User_Verified_SSL_Cerfi
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLVerified = COSSL_VERIFIED_USER;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSSLVerified = COSSL_VERIFIED_USER;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(COSSL_VERIFIED_USER, FakeConnection.SSLVerify());
EXPECT_EQ(COSSL_VERIFIED_USER, FakeConnection.SSLVerify());
@@
-289,7
+290,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Doesnt_Use_SSL_Return_Not_A
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, false);
FakeConnection.ResultSSLVerified = COSSL_NOTAPPLICABLE;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, false);
FakeConnection.ResultSSLVerified = COSSL_NOTAPPLICABLE;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(COSSL_NOTAPPLICABLE, FakeConnection.SSLVerify());
EXPECT_EQ(COSSL_NOTAPPLICABLE, FakeConnection.SSLVerify());
@@
-303,7
+304,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Has_A_Valid_Response){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultValidResponse = true;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultValidResponse = true;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(true, FakeConnection.HasValidResponse());
EXPECT_EQ(true, FakeConnection.HasValidResponse());
@@
-317,7
+318,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Has_A_Invalid_Response){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultValidResponse = false;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultValidResponse = false;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(false, FakeConnection.HasValidResponse());
EXPECT_EQ(false, FakeConnection.HasValidResponse());
@@
-331,7
+332,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Uses_A_Self_Signed_SSL_Cert
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSelfSigned = true;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSelfSigned = true;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(true, FakeConnection.IsSelfSigned());
EXPECT_EQ(true, FakeConnection.IsSelfSigned());
@@
-345,7
+346,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Doesnt_Use_A_Self_Signed_SS
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSelfSigned = false;
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultSelfSigned = false;
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ(false, FakeConnection.IsSelfSigned());
EXPECT_EQ(false, FakeConnection.IsSelfSigned());
@@
-359,7
+360,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Gets_The_Server_Prefix_Of_P
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultServerPrefix = "/prefix/test/a";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultServerPrefix = "/prefix/test/a";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ("/prefix/test/a", FakeConnection.GetDefaultPrefix());
EXPECT_EQ("/prefix/test/a", FakeConnection.GetDefaultPrefix());
@@
-373,7
+374,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Gets_The_Server_Prefix_Of_P
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
EXPECT_EQ("/prefix/test/b", FakeConnection.GetDefaultPrefix());
EXPECT_EQ("/prefix/test/b", FakeConnection.GetDefaultPrefix());
@@
-387,7
+388,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Adds_A_Contact_Successfully
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
std::string ContactFile =
"BEGIN:VCARD\n"
std::string ContactFile =
"BEGIN:VCARD\n"
@@
-421,7
+422,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Add_A_Contact_Due_
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
std::string ContactFile =
"BEGIN:VCARD\n"
std::string ContactFile =
"BEGIN:VCARD\n"
@@
-455,7
+456,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Add_A_Contact_Due_
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
std::string ContactFile =
"BEGIN:VCARD\n"
std::string ContactFile =
"BEGIN:VCARD\n"
@@
-489,7
+490,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Add_A_Contact_Due_
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
std::string ContactFile =
"BEGIN:VCARD\n"
std::string ContactFile =
"BEGIN:VCARD\n"
@@
-523,7
+524,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Edits_A_Server_Contact){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
std::string ContactFile =
"BEGIN:VCARD\n"
std::string ContactFile =
"BEGIN:VCARD\n"
@@
-571,7
+572,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Edit_A_Server_Cont
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
std::string ContactFile =
"BEGIN:VCARD\n"
std::string ContactFile =
"BEGIN:VCARD\n"
@@
-605,7
+606,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Edit_A_Server_Cont
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
std::string ContactFile =
"BEGIN:VCARD\n"
std::string ContactFile =
"BEGIN:VCARD\n"
@@
-639,7
+640,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Edit_A_Server_Cont
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
std::string ContactFile =
"BEGIN:VCARD\n"
std::string ContactFile =
"BEGIN:VCARD\n"
@@
-673,7
+674,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Deletes_A_Server_Contact){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_OK;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_OK;
FakeConnection.TestEntityTag = "";
@@
-713,7
+714,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Delete_A_Server_Co
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_ERROR_SERVER;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_ERROR_SERVER;
FakeConnection.TestEntityTag = "";
@@
-739,7
+740,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Delete_A_Server_Co
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_ERROR_SERVER;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_ERROR_SERVER;
FakeConnection.TestEntityTag = "";
@@
-765,7
+766,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Delete_A_Server_Co
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_ERROR_NOTCONNECTED;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_ERROR_NOTCONNECTED;
FakeConnection.TestEntityTag = "";
@@
-791,7
+792,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Gets_Server_Entity_Tag_Valu
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_OK;
FakeConnection.TestEntityTag = "a23124sfadfdvxc1646541bsdfaf";
FakeConnection.TestRequestResult = COREQUEST_OK;
FakeConnection.TestEntityTag = "a23124sfadfdvxc1646541bsdfaf";
@@
-817,7
+818,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Get_Server_Entity_
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_ERROR_SERVER;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_ERROR_SERVER;
FakeConnection.TestEntityTag = "";
@@
-843,7
+844,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Get_Server_Entity_
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_ERROR_SERVER;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_ERROR_SERVER;
FakeConnection.TestEntityTag = "";
@@
-869,7
+870,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Get_Server_Entity_
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_ERROR_NOTCONNECTED;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_ERROR_NOTCONNECTED;
FakeConnection.TestEntityTag = "";
@@
-895,7
+896,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Gets_Server_Contact_Data){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
std::string ContactFile =
"BEGIN:VCARD\n"
std::string ContactFile =
"BEGIN:VCARD\n"
@@
-929,7
+930,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Gets_Server_Contac
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_OK;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_OK;
FakeConnection.TestEntityTag = "";
@@
-955,7
+956,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Gets_Server_Contac
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_OK;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_OK;
FakeConnection.TestEntityTag = "";
@@
-981,7
+982,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Get_Server_Contact
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.TestRequestResult = COREQUEST_ERROR_NOTCONNECTED;
FakeConnection.TestEntityTag = "";
FakeConnection.TestRequestResult = COREQUEST_ERROR_NOTCONNECTED;
FakeConnection.TestEntityTag = "";
@@
-1007,7
+1008,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Gets_A_Full_Server_Contact_
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect(
);
+ FakeConnection.Connect(
false);
std::string ContactFile1 =
"BEGIN:VCARD\n"
std::string ContactFile1 =
"BEGIN:VCARD\n"
@@
-1087,7
+1088,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Gets_A_Partial_Server_Conta
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect(
);
+ FakeConnection.Connect(
false);
std::string ContactFile3 =
"BEGIN:VCARD\n"
std::string ContactFile3 =
"BEGIN:VCARD\n"
@@
-1137,7
+1138,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Get_A_Contact_List
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
COContactList ContactListSetup;
ContactListSetup.SyncToken = "";
COContactList ContactListSetup;
ContactListSetup.SyncToken = "";
@@
-1169,7
+1170,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Get_A_Contact_List
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
COContactList ContactListSetup;
ContactListSetup.SyncToken = "";
COContactList ContactListSetup;
ContactListSetup.SyncToken = "";
@@
-1201,7
+1202,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Fails_To_Get_A_Contact_List
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
COContactList ContactListSetup;
ContactListSetup.SyncToken = "";
COContactList ContactListSetup;
ContactListSetup.SyncToken = "";
@@
-1233,7
+1234,7
@@
TEST(CardDAV, Use_Fake_To_Simulate_A_Wait_For_A_Completed_Task){
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true, "/prefix", "Account1");
FakeConnection.ResultServerPrefix = "/prefix/test/b";
- FakeConnection.Connect();
+ FakeConnection.Connect(
false
);
FakeConnection.ResultTaskCompleted = false;
while (!FakeConnection.IsTaskCompleted()){
FakeConnection.ResultTaskCompleted = false;
while (!FakeConnection.IsTaskCompleted()){
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy