Classes | |
class | CheckSyncReport |
This class encapsulates logging and checking of a SyncReport. More... | |
class | ClientTest |
This is the interface expected by the testing framework for sync clients. More... | |
class | CreateSource |
helper class to encapsulate ClientTest::Config::createsource_t pointer and the corresponding parameters More... | |
class | LocalTests |
local test of one sync source and utility functions also used by sync tests More... | |
class | SyncTests |
Tests synchronization with one or more sync sources enabled. More... | |
Typedefs | |
typedef std::list< std::string > | UIDList |
Enumerations | |
enum | itemType { NEW_ITEMS, UPDATED_ITEMS, DELETED_ITEMS, TOTAL_ITEMS } |
Functions | |
int | countItemsOfType (SyncSource *source, itemType type) |
utility function which counts items of a certain kind known to the sync source | |
UIDList | listItemsOfType (SyncSource *source, itemType type) |
generates list of UIDs in the specified kind of items | |
const StringBuffer | initAdapter (const char *testName) |
Initializes the PlatformAdapter for a given test. | |
SyncManagerConfig * | getNewSyncManagerConfig (const char *testName, const bool setClientDefaults, ArrayList *defaultSources=NULL) |
Generates and returns a NEW ALLOCATED default configuration (SyncManagerConfig). | |
DMTClientConfig * | getNewDMTClientConfig (const char *testName, const bool setClientDefaults, ArrayList *defaultSources=NULL) |
Generates and returns a NEW ALLOCATED default configuration (DMTClientConfig). | |
char * | loadTestFile (const char *testName, const char *fileName, bool binary=false) |
Loads and returns (NEW ALLOCATED) the content of a test file. | |
StringBuffer | getTestFileFullPath (const char *testName, const char *fileName) |
Returns the full path of a given test file (concat "testcases/testName/fileName"). | |
StringBuffer | getTestDirFullPath (const char *testName) |
Returns the full path of a given test file (concat "testcases/testName/") with the final slash at the end. |
int countItemsOfType | ( | SyncSource * | source, | |
itemType | type | |||
) |
utility function which counts items of a certain kind known to the sync source
source | valid source ready to iterate; NULL triggers an assert | |
itemType | determines which iterator functions are used |
References listItemsOfType().
DMTClientConfig* getNewDMTClientConfig | ( | const char * | testName, | |
const bool | setClientDefaults, | |||
ArrayList * | defaultSources = NULL | |||
) |
Generates and returns a NEW ALLOCATED default configuration (DMTClientConfig).
testName | the name of the test which called this method (for deviceID) | |
setClientDefaults | if true, will set the default deviceConfig and accessConfig | |
defaultSources | ArrayList of source names (StringBuffer), to create default SyncSourceConfig. If not specified, non is created. Default is NULL. |
References initAdapter(), and setDefaults().
SyncManagerConfig* getNewSyncManagerConfig | ( | const char * | testName, | |
const bool | setClientDefaults, | |||
ArrayList * | defaultSources = NULL | |||
) |
Generates and returns a NEW ALLOCATED default configuration (SyncManagerConfig).
testName | the name of the test which called this method (for deviceID) | |
setClientDefaults | if true, will set the default deviceConfig and accessConfig | |
defaultSources | ArrayList of source names (StringBuffer), to create default SyncSourceConfig. If not specified, non is created. Default is NULL. |
References initAdapter(), and setDefaults().
StringBuffer getTestDirFullPath | ( | const char * | testName | ) |
Returns the full path of a given test file (concat "testcases/testName/") with the final slash at the end.
testName | the test name |
StringBuffer getTestFileFullPath | ( | const char * | testName, | |
const char * | fileName | |||
) |
Returns the full path of a given test file (concat "testcases/testName/fileName").
testName | the test name | |
fileName | the file name |
Referenced by utilsTest::getFileModTimeTest(), and loadTestFile().
const StringBuffer initAdapter | ( | const char * | testName | ) |
Initializes the PlatformAdapter for a given test.
To avoid spamming the config folder, the root context is composed so that all the tests will work under "Funambol/client-test", then the test name.
Referenced by getNewDMTClientConfig(), getNewSyncManagerConfig(), and TestFileSource::TestFileSource().
char* loadTestFile | ( | const char * | testName, | |
const char * | fileName, | |||
bool | binary = false | |||
) |
Loads and returns (NEW ALLOCATED) the content of a test file.
The test files are located under the dir "testcases/<test name>".
testName | the test name | |
fileName | the file name | |
binary | if true the file has to be opened in binary mode |
References getTestFileFullPath().
Referenced by utilsTest::getFileModTimeTest().