#include <ClientTest.h>
Public Member Functions | |
LocalTests (const std::string &name, ClientTest &cl, int sourceParam, ClientTest::Config &co) | |
virtual void | addTests () |
virtual std::string | insert (CreateSource createSource, const char *data, bool relaxed=false) |
virtual void | update (CreateSource createSource, const char *data, bool check=true) |
virtual void | deleteAll (CreateSource createSource) |
virtual void | compareDatabases (const char *refFile, SyncSource ©, bool raiseAssert=true) |
virtual int | insertManyItems (CreateSource createSource, int startIndex=1, int numItems=0, int size=-1) |
virtual void | testOpen () |
virtual void | testIterateTwice () |
virtual void | testSimpleInsert () |
virtual void | testLocalDeleteAll () |
virtual void | testComplexInsert () |
virtual void | testLocalUpdate () |
virtual void | testChanges () |
virtual void | testImport () |
virtual void | testImportDelete () |
virtual void | testManyChanges () |
virtual void | testLinkedItemsParent () |
virtual void | testLinkedItemsChild () |
virtual void | testLinkedItemsParentChild () |
virtual void | testLinkedItemsChildParent () |
virtual void | testLinkedItemsChildChangesParent () |
virtual void | testLinkedItemsRemoveParentFirst () |
virtual void | testLinkedItemsRemoveNormal () |
virtual void | testLinkedItemsInsertParentTwice () |
virtual void | testLinkedItemsInsertChildTwice () |
virtual void | testLinkedItemsParentUpdate () |
virtual void | testLinkedItemsUpdateChild () |
virtual void | testLinkedItemsInsertBothUpdateChild () |
virtual void | testLinkedItemsInsertBothUpdateParent () |
LocalTests (const std::string &name, ClientTest &cl, int sourceParam, ClientTest::Config &co) | |
virtual void | addTests () |
virtual std::string | insert (CreateSource createSource, const char *data, bool relaxed=false) |
virtual void | update (CreateSource createSource, const char *data, bool check=true) |
virtual void | deleteAll (CreateSource createSource) |
virtual void | compareDatabases (const char *refFile, SyncSource ©, bool raiseAssert=true) |
virtual int | insertManyItems (CreateSource createSource, int startIndex=1, int numItems=0, int size=-1) |
virtual void | testOpen () |
virtual void | testIterateTwice () |
virtual void | testSimpleInsert () |
virtual void | testLocalDeleteAll () |
virtual void | testComplexInsert () |
virtual void | testLocalUpdate () |
virtual void | testChanges () |
virtual void | testImport () |
virtual void | testImportDelete () |
virtual void | testManyChanges () |
virtual void | testLinkedItemsParent () |
virtual void | testLinkedItemsChild () |
virtual void | testLinkedItemsParentChild () |
virtual void | testLinkedItemsChildParent () |
virtual void | testLinkedItemsChildChangesParent () |
virtual void | testLinkedItemsRemoveParentFirst () |
virtual void | testLinkedItemsRemoveNormal () |
virtual void | testLinkedItemsInsertParentTwice () |
virtual void | testLinkedItemsInsertChildTwice () |
virtual void | testLinkedItemsParentUpdate () |
virtual void | testLinkedItemsUpdateChild () |
virtual void | testLinkedItemsInsertBothUpdateChild () |
virtual void | testLinkedItemsInsertBothUpdateParent () |
Public Attributes | |
ClientTest & | client |
const int | source |
const ClientTest::Config | config |
CreateSource | createSourceA |
CreateSource | createSourceB |
Definition at line 550 of file ClientTest.h.
LocalTests::LocalTests | ( | const std::string & | name, | |
ClientTest & | cl, | |||
int | sourceParam, | |||
ClientTest::Config & | co | |||
) | [inline] |
Definition at line 564 of file ClientTest.h.
LocalTests::LocalTests | ( | const std::string & | name, | |
ClientTest & | cl, | |||
int | sourceParam, | |||
ClientTest::Config & | co | |||
) | [inline] |
Definition at line 548 of file ClientTest.h.
virtual void LocalTests::addTests | ( | ) | [virtual] |
adds the supported tests to the instance itself; this is the function that a derived class can override to add additional tests
Reimplemented in EvolutionLocalTests.
virtual void LocalTests::compareDatabases | ( | const char * | refFile, | |
SyncSource & | copy, | |||
bool | raiseAssert = true | |||
) | [virtual] |
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) |
virtual void LocalTests::deleteAll | ( | CreateSource | createSource | ) | [virtual] |
deletes all items locally via sync source
virtual std::string LocalTests::insert | ( | CreateSource | createSource, | |
const char * | data, | |||
bool | relaxed = false | |||
) | [virtual] |
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 |
virtual int LocalTests::insertManyItems | ( | CreateSource | createSource, | |
int | startIndex = 1 , |
|||
int | numItems = 0 , |
|||
int | size = -1 | |||
) | [virtual] |
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 |
virtual void LocalTests::testChanges | ( | ) | [virtual] |
virtual void LocalTests::testComplexInsert | ( | ) | [virtual] |
virtual void LocalTests::testImport | ( | ) | [virtual] |
virtual void LocalTests::testImportDelete | ( | ) | [virtual] |
virtual void LocalTests::testIterateTwice | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsChild | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsChildChangesParent | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsChildParent | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsInsertBothUpdateChild | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsInsertBothUpdateParent | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsInsertChildTwice | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsInsertParentTwice | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsParent | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsParentChild | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsParentUpdate | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsRemoveNormal | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsRemoveParentFirst | ( | ) | [virtual] |
virtual void LocalTests::testLinkedItemsUpdateChild | ( | ) | [virtual] |
virtual void LocalTests::testLocalDeleteAll | ( | ) | [virtual] |
virtual void LocalTests::testLocalUpdate | ( | ) | [virtual] |
virtual void LocalTests::testManyChanges | ( | ) | [virtual] |
virtual void LocalTests::testOpen | ( | ) | [virtual] |
virtual void LocalTests::testSimpleInsert | ( | ) | [virtual] |
virtual void LocalTests::update | ( | CreateSource | createSource, | |
const char * | data, | |||
bool | check = true | |||
) | [virtual] |
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 client we are testing
Definition at line 553 of file ClientTest.h.
Referenced by compareDatabases(), and testImport().
configuration that corresponds to source
Definition at line 559 of file ClientTest.h.
Referenced by addTests(), EvolutionLocalTests::addTests(), compareDatabases(), insertManyItems(), testChanges(), testImport(), testIterateTwice(), testLinkedItemsChild(), testLinkedItemsChildChangesParent(), testLinkedItemsChildParent(), testLinkedItemsInsertBothUpdateChild(), testLinkedItemsInsertBothUpdateParent(), testLinkedItemsInsertChildTwice(), testLinkedItemsInsertParentTwice(), testLinkedItemsParent(), testLinkedItemsParentChild(), testLinkedItemsParentUpdate(), testLinkedItemsRemoveNormal(), testLinkedItemsRemoveParentFirst(), testLinkedItemsUpdateChild(), testLocalDeleteAll(), testLocalUpdate(), testManyChanges(), testOpen(), and testSimpleInsert().
helper funclets to create sources
Definition at line 562 of file ClientTest.h.
Referenced by compareDatabases(), insertManyItems(), testChanges(), testImport(), testIterateTwice(), testLinkedItemsChild(), testLinkedItemsChildChangesParent(), testLinkedItemsChildParent(), testLinkedItemsInsertBothUpdateChild(), testLinkedItemsInsertBothUpdateParent(), testLinkedItemsInsertChildTwice(), testLinkedItemsInsertParentTwice(), testLinkedItemsParent(), testLinkedItemsParentChild(), testLinkedItemsParentUpdate(), testLinkedItemsRemoveNormal(), testLinkedItemsRemoveParentFirst(), testLinkedItemsUpdateChild(), testLocalDeleteAll(), testLocalUpdate(), testManyChanges(), testOpen(), and testSimpleInsert().
Definition at line 562 of file ClientTest.h.
Referenced by testChanges(), testLinkedItemsChild(), testLinkedItemsChildChangesParent(), testLinkedItemsChildParent(), testLinkedItemsInsertBothUpdateChild(), testLinkedItemsInsertBothUpdateParent(), testLinkedItemsInsertChildTwice(), testLinkedItemsInsertParentTwice(), testLinkedItemsParent(), testLinkedItemsParentChild(), testLinkedItemsParentUpdate(), testLinkedItemsRemoveNormal(), testLinkedItemsRemoveParentFirst(), testLinkedItemsUpdateChild(), and testManyChanges().
const int LocalTests::source |
number of the source we are testing in that client
Definition at line 556 of file ClientTest.h.
Referenced by deleteAll(), insert(), testIterateTwice(), testOpen(), and update().