Classes | |
class | ClientTestFactory |
class | ClientOutputter |
class | ClientListener |
Functions | |
template<class T , class V > | |
int | countEqual (const T &container, const V &value) |
void | simplifyFilename (string &filename) |
const string & | getCurrentTest () |
int | main (int argc, char *argv[]) |
virtual void | LocalTests::addTests () |
virtual std::string | LocalTests::insert (CreateSource createSource, const char *data, bool relaxed=false) |
virtual void | LocalTests::update (CreateSource createSource, const char *data, bool check=true) |
virtual void | LocalTests::deleteAll (CreateSource createSource) |
virtual void | LocalTests::compareDatabases (const char *refFile, SyncSource ©, bool raiseAssert=true) |
virtual int | LocalTests::insertManyItems (CreateSource createSource, int startIndex=1, int numItems=0, int size=-1) |
virtual void | LocalTests::testOpen () |
virtual void | LocalTests::testIterateTwice () |
virtual void | LocalTests::testSimpleInsert () |
virtual void | LocalTests::testLocalDeleteAll () |
virtual void | LocalTests::testComplexInsert () |
virtual void | LocalTests::testLocalUpdate () |
virtual void | LocalTests::testChanges () |
virtual void | LocalTests::testImport () |
virtual void | LocalTests::testImportDelete () |
virtual void | LocalTests::testManyChanges () |
virtual void | LocalTests::testLinkedItemsParent () |
virtual void | LocalTests::testLinkedItemsChild () |
virtual void | LocalTests::testLinkedItemsParentChild () |
virtual void | LocalTests::testLinkedItemsChildParent () |
virtual void | LocalTests::testLinkedItemsChildChangesParent () |
virtual void | LocalTests::testLinkedItemsRemoveParentFirst () |
virtual void | LocalTests::testLinkedItemsRemoveNormal () |
virtual void | LocalTests::testLinkedItemsInsertParentTwice () |
virtual void | LocalTests::testLinkedItemsInsertChildTwice () |
virtual void | LocalTests::testLinkedItemsParentUpdate () |
virtual void | LocalTests::testLinkedItemsUpdateChild () |
virtual void | LocalTests::testLinkedItemsInsertBothUpdateChild () |
virtual void | LocalTests::testLinkedItemsInsertBothUpdateParent () |
SyncTests::SyncTests (const std::string &name, ClientTest &cl, std::vector< int > sourceIndices, bool isClientA=true) | |
SyncTests::~SyncTests () | |
virtual void | SyncTests::addTests () |
virtual void | SyncTests::compareDatabases () |
virtual void | SyncTests::deleteAll (DeleteAllMode mode=DELETE_ALL_SYNC) |
virtual void | SyncTests::doCopy () |
virtual void | SyncTests::refreshClient () |
virtual void | SyncTests::testDeleteAllRefresh () |
virtual void | SyncTests::testRefreshSemantic () |
virtual void | SyncTests::testRefreshStatus () |
virtual void | SyncTests::testUpdate () |
virtual void | SyncTests::testComplexUpdate () |
virtual void | SyncTests::testDelete () |
virtual void | SyncTests::testMerge () |
virtual void | SyncTests::testTwinning () |
virtual void | SyncTests::testOneWayFromServer () |
virtual void | SyncTests::testOneWayFromClient () |
virtual void | SyncTests::testItems () |
virtual void | SyncTests::testAddUpdate () |
virtual void | SyncTests::testManyItems () |
virtual void | SyncTests::doVarSizes (bool withMaxMsgSize, bool withLargeObject, const char *encoding) |
virtual void | SyncTests::sync (SyncMode syncMode, const std::string &logprefix="", CheckSyncReport checkReport=CheckSyncReport(), long maxMsgSize=0, long maxObjSize=0, bool loSupport=false, const char *encoding="") |
virtual void | ClientTest::registerTests () |
ClientTest::ClientTest (int serverSleepSec=0, const std::string &serverLog="") | |
virtual | ClientTest::~ClientTest () |
virtual LocalTests * | ClientTest::createLocalTests (const std::string &name, int sourceParam, ClientTest::Config &co) |
virtual SyncTests * | ClientTest::createSyncTests (const std::string &name, std::vector< int > sourceIndices, bool isClientA=true) |
static int | ClientTest::dump (ClientTest &client, SyncSource &source, const char *file) |
static int | ClientTest::import (ClientTest &client, SyncSource &source, const char *file) |
static bool | ClientTest::compare (ClientTest &client, const char *fileA, const char *fileB) |
virtual void | ClientTest::postSync (int res, const std::string &logname) |
static void | ClientTest::getTestData (const char *type, Config &config) |
virtual void | CheckSyncReport::check (int res, SyncReport &report) const |
Variables | |
ClientListener | syncListener |
void SyncTests::addTests | ( | ) | [virtual, inherited] |
adds the supported tests to the instance itself
Definition at line 1602 of file ClientTest.cpp.
References SyncTests::accessClientB, ADD_TEST, SyncTests::client, ClientTest::Config::compare, ClientTest::Config::complexUpdateItem, ClientTest::Config::createSourceA, ClientTest::Config::dump, ClientTest::Config::import, ClientTest::Config::insertItem, isB64Enabled(), ClientTest::Config::mergeItem1, ClientTest::Config::mergeItem2, SyncTests::sources, ClientTest::Config::templateItem, SyncTests::testAddUpdate(), SyncTests::testComplexUpdate(), SyncTests::testCopy(), SyncTests::testDelete(), SyncTests::testDeleteAllRefresh(), SyncTests::testItems(), SyncTests::testLargeObject(), SyncTests::testLargeObjectBin(), SyncTests::testLargeObjectEncoded(), SyncTests::testManyItems(), SyncTests::testMaxMsg(), SyncTests::testMerge(), SyncTests::testOneWayFromClient(), SyncTests::testOneWayFromServer(), SyncTests::testRefreshFromClientSync(), SyncTests::testRefreshFromServerSync(), SyncTests::testRefreshSemantic(), SyncTests::testRefreshStatus(), SyncTests::testSlowSync(), SyncTests::testTwinning(), SyncTests::testTwoWaySync(), SyncTests::testUpdate(), and ClientTest::Config::updateItem.
Referenced by ClientTestFactory::makeTest().
void LocalTests::addTests | ( | ) | [virtual, inherited] |
adds the supported tests to the instance itself; this is the function that a derived class can override to add additional tests
adds the supported tests to the instance itself
Reimplemented in EvolutionLocalTests.
Definition at line 183 of file ClientTest.cpp.
References ADD_TEST, ClientTest::Config::childItem, ClientTest::Config::childItemUpdate, ClientTest::Config::compare, LocalTests::config, ClientTest::Config::createSourceA, ClientTest::Config::createSourceB, ClientTest::Config::dump, ClientTest::Config::import, ClientTest::Config::insertItem, ClientTest::Config::parentItem, ClientTest::Config::parentItemUpdate, ClientTest::Config::sourceKnowsItemSemantic, ClientTest::Config::templateItem, ClientTest::Config::testcases, LocalTests::testChanges(), LocalTests::testComplexInsert(), LocalTests::testImport(), LocalTests::testImportDelete(), LocalTests::testIterateTwice(), LocalTests::testLinkedItemsChild(), LocalTests::testLinkedItemsChildChangesParent(), LocalTests::testLinkedItemsChildParent(), LocalTests::testLinkedItemsInsertBothUpdateChild(), LocalTests::testLinkedItemsInsertBothUpdateParent(), LocalTests::testLinkedItemsInsertChildTwice(), LocalTests::testLinkedItemsInsertParentTwice(), LocalTests::testLinkedItemsParent(), LocalTests::testLinkedItemsParentChild(), LocalTests::testLinkedItemsParentUpdate(), LocalTests::testLinkedItemsRemoveNormal(), LocalTests::testLinkedItemsRemoveParentFirst(), LocalTests::testLinkedItemsUpdateChild(), LocalTests::testLocalDeleteAll(), LocalTests::testLocalUpdate(), LocalTests::testManyChanges(), LocalTests::testOpen(), LocalTests::testSimpleInsert(), ClientTest::Config::uniqueProperties, and ClientTest::Config::updateItem.
Referenced by ClientTestFactory::makeTest().
void CheckSyncReport::check | ( | int | res, | |
SyncReport & | report | |||
) | const [virtual, inherited] |
checks that the sync completed as expected and throws CPPUnit exceptions if something is wrong
res | return code from SyncClient::sync() | |
report | the sync report stored in the SyncClient |
Definition at line 3108 of file ClientTest.cpp.
References CLIENT, CLIENT_TEST_EQUAL, CheckSyncReport::clientAdded, CheckSyncReport::clientDeleted, CheckSyncReport::clientUpdated, SyncSourceReport::getItemReportFailedCount(), SyncSourceReport::getItemReportSuccessfulCount(), SyncSourceReport::getSourceName(), SyncSourceReport::getState(), SyncReport::getSyncSourceReport(), SERVER, CheckSyncReport::serverAdded, CheckSyncReport::serverDeleted, CheckSyncReport::serverUpdated, SOURCE_INACTIVE, and SyncReport::toString().
Referenced by TestEvolution::sync().
ClientTest::ClientTest | ( | int | serverSleepSec = 0 , |
|
const std::string & | serverLog = "" | |||
) | [inherited] |
bool ClientTest::compare | ( | ClientTest & | client, | |
const char * | fileA, | |||
const char * | fileB | |||
) | [static, inherited] |
utility function for comparing vCard and iCal files with the external synccompare.pl Perl script
Reimplemented in TestEvolution.
Definition at line 2621 of file ClientTest.cpp.
Referenced by getTestData().
void SyncTests::compareDatabases | ( | ) | [protected, virtual, inherited] |
compare databases of first and second client
Definition at line 1663 of file ClientTest.cpp.
References SyncTests::accessClientB, SOURCE_ASSERT_NO_FAILURE, and SyncTests::sources.
Referenced by SyncTests::doCopy(), SyncTests::doVarSizes(), SyncTests::testAddUpdate(), SyncTests::testComplexUpdate(), SyncTests::testCopy(), SyncTests::testItems(), SyncTests::testManyItems(), SyncTests::testTwinning(), and SyncTests::testUpdate().
void LocalTests::compareDatabases | ( | const char * | refFile, | |
SyncSource & | copy, | |||
bool | raiseAssert = true | |||
) | [virtual, inherited] |
takes two databases, exports them, then compares them using synccompare
refFile | existing file with source reference items, NULL uses a dump of sync source A instead | |
copy | a sync source which contains the copied items, begin/endSync will be called | |
raiseAssert | raise assertion if comparison yields differences (defaults to true) |
Definition at line 417 of file ClientTest.cpp.
References SyncSource::beginSync(), LocalTests::client, ClientTest::Config::compare, LocalTests::config, LocalTests::createSourceA, ClientTest::Config::dump, SyncSource::endSync(), getCurrentTest(), simplifyFilename(), SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::testImport().
int countEqual | ( | const T & | container, | |
const V & | value | |||
) | [inline] |
Definition at line 821 of file ClientTest.cpp.
Referenced by LocalTests::testLinkedItemsChild(), LocalTests::testLinkedItemsChildChangesParent(), LocalTests::testLinkedItemsChildParent(), LocalTests::testLinkedItemsInsertBothUpdateChild(), LocalTests::testLinkedItemsInsertBothUpdateParent(), LocalTests::testLinkedItemsInsertChildTwice(), LocalTests::testLinkedItemsInsertParentTwice(), LocalTests::testLinkedItemsParent(), LocalTests::testLinkedItemsParentChild(), LocalTests::testLinkedItemsParentUpdate(), LocalTests::testLinkedItemsRemoveNormal(), LocalTests::testLinkedItemsRemoveParentFirst(), and LocalTests::testLinkedItemsUpdateChild().
LocalTests * ClientTest::createLocalTests | ( | const std::string & | name, | |
int | sourceParam, | |||
ClientTest::Config & | co | |||
) | [virtual, inherited] |
Creates an instance of LocalTests (default implementation) or a class derived from it. LocalTests provides tests which cover the SyncSource interface and can be executed without a SyncML server. It also contains utility functions for working with SyncSources.
A ClientTest implementation can, but doesn't have to extend these tests by instantiating a derived class here.
Reimplemented in TestEvolution.
Definition at line 2567 of file ClientTest.cpp.
Referenced by ClientTestFactory::makeTest(), and SyncTests::SyncTests().
SyncTests * ClientTest::createSyncTests | ( | const std::string & | name, | |
std::vector< int > | sourceIndices, | |||
bool | isClientA = true | |||
) | [virtual, inherited] |
Creates an instance of SyncTests (default) or a class derived from it. SyncTests provides tests which cover the actual interaction with a SyncML server.
A ClientTest implementation can, but doesn't have to extend these tests by instantiating a derived class here.
Definition at line 2572 of file ClientTest.cpp.
Referenced by ClientTestFactory::makeTest(), and SyncTests::SyncTests().
void SyncTests::deleteAll | ( | DeleteAllMode | mode = DELETE_ALL_SYNC |
) | [protected, virtual, inherited] |
deletes all items locally and on server
Definition at line 1681 of file ClientTest.cpp.
References SyncTests::DELETE_ALL_REFRESH, SyncTests::DELETE_ALL_SYNC, SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::doCopy(), SyncTests::doVarSizes(), SyncTests::testAddUpdate(), SyncTests::testDeleteAllRefresh(), SyncTests::testDeleteAllSync(), SyncTests::testItems(), SyncTests::testManyItems(), SyncTests::testOneWayFromClient(), SyncTests::testOneWayFromServer(), SyncTests::testRefreshSemantic(), and SyncTests::testTwinning().
void LocalTests::deleteAll | ( | CreateSource | createSource | ) | [virtual, inherited] |
deletes all items locally via sync source
Definition at line 364 of file ClientTest.cpp.
References CreateSource::createSource, LocalTests::source, SOURCE_ASSERT, SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_MESSAGE, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::testChanges(), LocalTests::testLinkedItemsChild(), LocalTests::testLinkedItemsChildChangesParent(), LocalTests::testLinkedItemsChildParent(), LocalTests::testLinkedItemsInsertBothUpdateChild(), LocalTests::testLinkedItemsInsertBothUpdateParent(), LocalTests::testLinkedItemsInsertChildTwice(), LocalTests::testLinkedItemsInsertParentTwice(), LocalTests::testLinkedItemsParent(), LocalTests::testLinkedItemsParentChild(), LocalTests::testLinkedItemsParentUpdate(), LocalTests::testLinkedItemsRemoveNormal(), LocalTests::testLinkedItemsRemoveParentFirst(), LocalTests::testLinkedItemsUpdateChild(), LocalTests::testLocalDeleteAll(), and LocalTests::testManyChanges().
void SyncTests::doCopy | ( | ) | [protected, virtual, inherited] |
get both clients in sync with empty server, then copy one item from client A to B
Definition at line 1708 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::compareDatabases(), SyncTests::deleteAll(), SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::testComplexUpdate(), SyncTests::testCopy(), SyncTests::testDelete(), SyncTests::testMerge(), and SyncTests::testUpdate().
void SyncTests::doVarSizes | ( | bool | withMaxMsgSize, | |
bool | withLargeObject, | |||
const char * | encoding | |||
) | [protected, virtual, inherited] |
implements testMaxMsg(), testLargeObject(), testLargeObjectEncoded() using a sequence of items with varying sizes
Definition at line 2370 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::compareDatabases(), SyncTests::deleteAll(), SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::testLargeObject(), SyncTests::testLargeObjectBin(), SyncTests::testLargeObjectEncoded(), and SyncTests::testMaxMsg().
int ClientTest::dump | ( | ClientTest & | client, | |
SyncSource & | source, | |||
const char * | file | |||
) | [static, inherited] |
utility function for dumping items which are C strings with blank lines as separator
Definition at line 2577 of file ClientTest.cpp.
References SyncSource::getFirstItem(), SyncSource::getNextItem(), and SOURCE_ASSERT_NO_FAILURE.
Referenced by getTestData().
const string& getCurrentTest | ( | ) |
Definition at line 177 of file client-test-main.cpp.
References Sync4jListener::getCurrentTest(), and syncListener.
void ClientTest::getTestData | ( | const char * | type, | |
Config & | config | |||
) | [static, inherited] |
A derived class can use this call to get default test cases, but still has to add callbacks which create sources and execute a sync session.
Some of the test cases are compiled into the library, other depend on the auxiliary files from the "test" directory. Currently supported types:
Definition at line 2657 of file ClientTest.cpp.
References ClientTest::Config::childItem, ClientTest::Config::childItemUpdate, compare(), ClientTest::Config::compare, ClientTest::Config::complexUpdateItem, dump(), ClientTest::Config::dump, ClientTest::Config::import, ClientTest::Config::insertItem, ClientTest::Config::mergeItem1, ClientTest::Config::mergeItem2, ClientTest::Config::numItems, ClientTest::Config::parentItem, ClientTest::Config::parentItemUpdate, ClientTest::Config::sizeProperty, ClientTest::Config::sourceKnowsItemSemantic, ClientTest::Config::sourceName, ClientTest::Config::templateItem, ClientTest::Config::testcases, ClientTest::Config::type, ClientTest::Config::uniqueProperties, ClientTest::Config::updateItem, and ClientTest::Config::uri.
Referenced by TestEvolution::getSourceConfig().
int ClientTest::import | ( | ClientTest & | client, | |
SyncSource & | source, | |||
const char * | file | |||
) | [static, inherited] |
utility function for importing items with blank lines as separator
Definition at line 2591 of file ClientTest.cpp.
std::string LocalTests::insert | ( | CreateSource | createSource, | |
const char * | data, | |||
bool | relaxed = false | |||
) | [virtual, inherited] |
opens source and inserts the given item; can be called regardless whether the data source already contains items or not
The type of the item is unset; it is assumed that the source can handle that.
relaxed | if true, then disable some of the additional checks after adding the item |
Definition at line 239 of file ClientTest.cpp.
References LocalTests::source, SOURCE_ASSERT, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::testLinkedItemsChild(), LocalTests::testLinkedItemsChildChangesParent(), LocalTests::testLinkedItemsChildParent(), LocalTests::testLinkedItemsInsertBothUpdateChild(), LocalTests::testLinkedItemsInsertBothUpdateParent(), LocalTests::testLinkedItemsInsertChildTwice(), LocalTests::testLinkedItemsInsertParentTwice(), LocalTests::testLinkedItemsParent(), LocalTests::testLinkedItemsParentChild(), LocalTests::testLinkedItemsParentUpdate(), LocalTests::testLinkedItemsRemoveNormal(), LocalTests::testLinkedItemsRemoveParentFirst(), LocalTests::testLinkedItemsUpdateChild(), LocalTests::testLocalDeleteAll(), and LocalTests::testSimpleInsert().
int LocalTests::insertManyItems | ( | CreateSource | createSource, | |
int | startIndex = 1 , |
|||
int | numItems = 0 , |
|||
int | size = -1 | |||
) | [virtual, inherited] |
insert artificial items, number of them determined by TEST_EVOLUTION_NUM_ITEMS unless passed explicitly
createSource | a factory for the sync source that is to be used | |
startIndex | IDs are generated starting with this value | |
numItems | number of items to be inserted if non-null, otherwise TEST_EVOLUTION_NUM_ITEMS is used | |
size | minimum size for new items |
createSource | a factory for the sync source that is to be used | |
startIndex | IDs are generated starting with this value | |
numItems | number of items to be inserted if non-null, otherwise config.numItems is used | |
size | minimum size for new items |
Definition at line 454 of file ClientTest.cpp.
References LocalTests::config, LocalTests::createSourceA, ClientTest::Config::numItems, ClientTest::Config::sizeProperty, SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, ClientTest::Config::templateItem, and ClientTest::Config::uniqueProperties.
Referenced by LocalTests::testManyChanges().
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 194 of file client-test-main.cpp.
References Sync4jListener::addAllowedFailures(), Sync4jListener::hasFailed(), and syncListener.
USE_NAMESPACE void ClientTest::postSync | ( | int | res, | |
const std::string & | logname | |||
) | [virtual, inherited] |
This is called after successful sync() calls (res == 0) as well as after unsuccessful ones (res != 1). The default implementation sleeps for the number of seconds specified when constructing this instance and copies the server log if one was named.
res | result of sync() | |
logname | base name of the current sync log (without ".client.[AB].log" suffix) |
Definition at line 2635 of file ClientTest.cpp.
References serverLogFileName, and serverSleepSeconds.
Referenced by SyncTests::sync().
void SyncTests::refreshClient | ( | ) | [protected, virtual, inherited] |
replicate server database locally: same as SYNC_REFRESH_FROM_SERVER, but done with explicit local delete and then a SYNC_SLOW because some servers do no support SYNC_REFRESH_FROM_SERVER
Definition at line 1733 of file ClientTest.cpp.
References SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::testAddUpdate(), SyncTests::testItems(), SyncTests::testManyItems(), SyncTests::testOneWayFromServer(), and SyncTests::testTwinning().
void ClientTest::registerTests | ( | ) | [virtual, inherited] |
This function registers tests using this instance of ClientTest for later use during a test run.
The instance must remain valid until after the tests were run. To run them use a separate test runner, like the one from client-test-main.cpp.
Definition at line 2545 of file ClientTest.cpp.
void simplifyFilename | ( | string & | filename | ) |
Definition at line 68 of file client-test-main.cpp.
void SyncTests::sync | ( | SyncMode | syncMode, | |
const std::string & | logprefix = "" , |
|||
CheckSyncReport | checkReport = CheckSyncReport() , |
|||
long | maxMsgSize = 0 , |
|||
long | maxObjSize = 0 , |
|||
bool | loSupport = false , |
|||
const char * | encoding = "" | |||
) | [protected, virtual, inherited] |
executes a sync with the given options, checks the result and (optionally) the sync report
Definition at line 2412 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::client, getCurrentTest(), postSync(), simplifyFilename(), SyncTests::sourceArray, and sync().
Referenced by SyncTests::deleteAll(), SyncTests::doCopy(), SyncTests::doVarSizes(), SyncTests::refreshClient(), SyncTests::testAddUpdate(), SyncTests::testComplexUpdate(), SyncTests::testDelete(), SyncTests::testDeleteAllRefresh(), SyncTests::testItems(), SyncTests::testManyItems(), SyncTests::testMerge(), SyncTests::testOneWayFromClient(), SyncTests::testOneWayFromServer(), SyncTests::testRefreshFromClientSync(), SyncTests::testRefreshFromServerSync(), SyncTests::testRefreshSemantic(), SyncTests::testRefreshStatus(), SyncTests::testSlowSync(), SyncTests::testTwinning(), SyncTests::testTwoWaySync(), and SyncTests::testUpdate().
SyncTests::SyncTests | ( | const std::string & | name, | |
ClientTest & | cl, | |||
std::vector< int > | sourceIndices, | |||
bool | isClientA = true | |||
) | [inherited] |
Definition at line 1563 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::client, createLocalTests(), createSyncTests(), getClientB(), getSourceConfig(), SyncTests::sourceArray, ClientTest::Config::sourceName, and SyncTests::sources.
void SyncTests::testAddUpdate | ( | ) | [protected, virtual, inherited] |
Definition at line 2304 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::compareDatabases(), SyncTests::deleteAll(), SyncTests::refreshClient(), SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void LocalTests::testChanges | ( | ) | [virtual, inherited] |
Definition at line 625 of file ClientTest.cpp.
References LocalTests::config, LocalTests::createSourceA, LocalTests::createSourceB, ClientTest::Config::createSourceB, LocalTests::deleteAll(), SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, LocalTests::testLocalDeleteAll(), LocalTests::testSimpleInsert(), LocalTests::update(), and ClientTest::Config::updateItem.
Referenced by LocalTests::addTests().
void LocalTests::testComplexInsert | ( | ) | [virtual, inherited] |
Definition at line 608 of file ClientTest.cpp.
References LocalTests::testIterateTwice(), LocalTests::testLocalDeleteAll(), and LocalTests::testSimpleInsert().
Referenced by LocalTests::addTests().
void SyncTests::testComplexUpdate | ( | ) | [protected, virtual, inherited] |
Definition at line 1849 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::compareDatabases(), SyncTests::doCopy(), SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void SyncTests::testDelete | ( | ) | [protected, virtual, inherited] |
Definition at line 1873 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::doCopy(), SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void SyncTests::testDeleteAllRefresh | ( | ) | [protected, virtual, inherited] |
Definition at line 1743 of file ClientTest.cpp.
References SyncTests::DELETE_ALL_SYNC, SyncTests::deleteAll(), SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void LocalTests::testImport | ( | ) | [virtual, inherited] |
Definition at line 745 of file ClientTest.cpp.
References LocalTests::client, ClientTest::Config::compare, LocalTests::compareDatabases(), LocalTests::config, LocalTests::createSourceA, ClientTest::Config::dump, ClientTest::Config::import, SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, ClientTest::Config::testcases, and LocalTests::testLocalDeleteAll().
Referenced by LocalTests::addTests(), and LocalTests::testImportDelete().
void LocalTests::testImportDelete | ( | ) | [virtual, inherited] |
Definition at line 770 of file ClientTest.cpp.
References LocalTests::testImport(), and LocalTests::testLocalDeleteAll().
Referenced by LocalTests::addTests().
void SyncTests::testItems | ( | ) | [protected, virtual, inherited] |
Definition at line 2277 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::compareDatabases(), SyncTests::deleteAll(), SyncTests::refreshClient(), SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void LocalTests::testIterateTwice | ( | ) | [virtual, inherited] |
Definition at line 574 of file ClientTest.cpp.
References LocalTests::config, LocalTests::createSourceA, ClientTest::Config::createSourceA, LocalTests::source, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_MESSAGE.
Referenced by LocalTests::addTests(), and LocalTests::testComplexInsert().
void LocalTests::testLinkedItemsChild | ( | ) | [virtual, inherited] |
Definition at line 877 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsChildChangesParent | ( | ) | [virtual, inherited] |
Definition at line 1023 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsChildParent | ( | ) | [virtual, inherited] |
Definition at line 972 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsInsertBothUpdateChild | ( | ) | [virtual, inherited] |
Definition at line 1442 of file ClientTest.cpp.
References ClientTest::Config::childItem, ClientTest::Config::childItemUpdate, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsInsertBothUpdateParent | ( | ) | [virtual, inherited] |
Definition at line 1502 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, ClientTest::Config::parentItemUpdate, SOURCE_ASSERT, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsInsertChildTwice | ( | ) | [virtual, inherited] |
Definition at line 1266 of file ClientTest.cpp.
References ClientTest::Config::childItem, ClientTest::Config::childItemUpdate, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsInsertParentTwice | ( | ) | [virtual, inherited] |
Definition at line 1210 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsParent | ( | ) | [virtual, inherited] |
Definition at line 830 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsParentChild | ( | ) | [virtual, inherited] |
Definition at line 925 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsParentUpdate | ( | ) | [virtual, inherited] |
Definition at line 1326 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, ClientTest::Config::parentItemUpdate, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsRemoveNormal | ( | ) | [virtual, inherited] |
Definition at line 1151 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsRemoveParentFirst | ( | ) | [virtual, inherited] |
Definition at line 1088 of file ClientTest.cpp.
References ClientTest::Config::childItem, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLinkedItemsUpdateChild | ( | ) | [virtual, inherited] |
Definition at line 1382 of file ClientTest.cpp.
References ClientTest::Config::childItem, ClientTest::Config::childItemUpdate, LocalTests::config, countEqual(), LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insert(), ClientTest::Config::parentItem, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::addTests().
void LocalTests::testLocalDeleteAll | ( | ) | [virtual, inherited] |
Definition at line 597 of file ClientTest.cpp.
References LocalTests::config, LocalTests::createSourceA, ClientTest::Config::createSourceA, LocalTests::deleteAll(), LocalTests::insert(), and ClientTest::Config::insertItem.
Referenced by LocalTests::addTests(), LocalTests::testChanges(), LocalTests::testComplexInsert(), LocalTests::testImport(), LocalTests::testImportDelete(), and LocalTests::testLocalUpdate().
void LocalTests::testLocalUpdate | ( | ) | [virtual, inherited] |
Definition at line 615 of file ClientTest.cpp.
References LocalTests::config, LocalTests::createSourceA, LocalTests::testLocalDeleteAll(), LocalTests::testSimpleInsert(), LocalTests::update(), and ClientTest::Config::updateItem.
Referenced by LocalTests::addTests().
void LocalTests::testManyChanges | ( | ) | [virtual, inherited] |
Definition at line 779 of file ClientTest.cpp.
References LocalTests::config, LocalTests::createSourceA, LocalTests::createSourceB, LocalTests::deleteAll(), LocalTests::insertManyItems(), SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, ClientTest::Config::templateItem, and ClientTest::Config::uniqueProperties.
Referenced by LocalTests::addTests().
void SyncTests::testManyItems | ( | ) | [protected, virtual, inherited] |
Definition at line 2337 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::compareDatabases(), SyncTests::deleteAll(), SyncTests::refreshClient(), SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void SyncTests::testMerge | ( | ) | [protected, virtual, inherited] |
Definition at line 1900 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::doCopy(), SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void SyncTests::testOneWayFromClient | ( | ) | [protected, virtual, inherited] |
Definition at line 2129 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::deleteAll(), SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void SyncTests::testOneWayFromServer | ( | ) | [protected, virtual, inherited] |
Definition at line 1974 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::deleteAll(), SyncTests::refreshClient(), SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void LocalTests::testOpen | ( | ) | [virtual, inherited] |
Definition at line 564 of file ClientTest.cpp.
References LocalTests::config, LocalTests::createSourceA, ClientTest::Config::createSourceA, and LocalTests::source.
Referenced by LocalTests::addTests().
void SyncTests::testRefreshSemantic | ( | ) | [protected, virtual, inherited] |
Definition at line 1780 of file ClientTest.cpp.
References SyncTests::deleteAll(), SOURCE_ASSERT_EQUAL, SOURCE_ASSERT_NO_FAILURE, SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void SyncTests::testRefreshStatus | ( | ) | [protected, virtual, inherited] |
Definition at line 1810 of file ClientTest.cpp.
References SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void LocalTests::testSimpleInsert | ( | ) | [virtual, inherited] |
Definition at line 588 of file ClientTest.cpp.
References LocalTests::config, LocalTests::createSourceA, ClientTest::Config::createSourceA, LocalTests::insert(), and ClientTest::Config::insertItem.
Referenced by LocalTests::addTests(), LocalTests::testChanges(), LocalTests::testComplexInsert(), and LocalTests::testLocalUpdate().
void SyncTests::testTwinning | ( | ) | [protected, virtual, inherited] |
Definition at line 1938 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::compareDatabases(), SyncTests::deleteAll(), SyncTests::refreshClient(), SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void SyncTests::testUpdate | ( | ) | [protected, virtual, inherited] |
Definition at line 1828 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::compareDatabases(), SyncTests::doCopy(), SyncTests::sources, and SyncTests::sync().
Referenced by SyncTests::addTests().
void LocalTests::update | ( | CreateSource | createSource, | |
const char * | data, | |||
bool | check = true | |||
) | [virtual, inherited] |
assumes that exactly one element is currently inserted and updates it with the given item
The type of the item is cleared, as in insert() above.
check | if true, then reopen the source and verify that the reported items are as expected |
The type of the item is cleared, as in insert() above.
Definition at line 325 of file ClientTest.cpp.
References CreateSource::createSource, LocalTests::source, SOURCE_ASSERT, SOURCE_ASSERT_EQUAL, and SOURCE_ASSERT_NO_FAILURE.
Referenced by LocalTests::testChanges(), and LocalTests::testLocalUpdate().
ClientTest::~ClientTest | ( | ) | [virtual, inherited] |
Definition at line 2558 of file ClientTest.cpp.
SyncTests::~SyncTests | ( | ) | [inherited] |
Definition at line 1589 of file ClientTest.cpp.
References SyncTests::accessClientB, SyncTests::sourceArray, and SyncTests::sources.