SyncTests Class Reference
[Client]

#include <ClientTest.h>

Collaboration diagram for SyncTests:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SyncTests (const std::string &name, ClientTest &cl, std::vector< int > sourceIndices, bool isClientA=true)
 ~SyncTests ()
virtual void addTests ()
 SyncTests (const std::string &name, ClientTest &cl, std::vector< int > sourceIndices, bool isClientA=true)
 ~SyncTests ()
virtual void addTests ()

Public Attributes

ClientTestclient

Protected Types

enum  DeleteAllMode { DELETE_ALL_SYNC, DELETE_ALL_REFRESH, DELETE_ALL_SYNC, DELETE_ALL_REFRESH }
enum  DeleteAllMode { DELETE_ALL_SYNC, DELETE_ALL_REFRESH, DELETE_ALL_SYNC, DELETE_ALL_REFRESH }
typedef std::vector< std::pair
< int, LocalTests * >
>::iterator 
source_it
typedef std::vector< std::pair
< int, LocalTests * >
>::iterator 
source_it

Protected Member Functions

virtual void compareDatabases ()
virtual void deleteAll (DeleteAllMode mode=DELETE_ALL_SYNC)
virtual void doCopy ()
virtual void refreshClient ()
virtual void testTwoWaySync ()
virtual void testSlowSync ()
virtual void testRefreshFromServerSync ()
virtual void testRefreshFromClientSync ()
virtual void testDeleteAllSync ()
virtual void testDeleteAllRefresh ()
virtual void testRefreshSemantic ()
virtual void testRefreshStatus ()
void testCopy ()
virtual void testUpdate ()
virtual void testComplexUpdate ()
virtual void testDelete ()
virtual void testMerge ()
virtual void testTwinning ()
virtual void testOneWayFromServer ()
virtual void testOneWayFromClient ()
virtual void testItems ()
virtual void testAddUpdate ()
void testMaxMsg ()
void testLargeObject ()
void testLargeObjectBin ()
void testLargeObjectEncoded ()
virtual void testManyItems ()
virtual void doVarSizes (bool withMaxMsgSize, bool withLargeObject, const char *encoding)
virtual void sync (SyncMode syncMode, const std::string &logprefix="", CheckSyncReport checkReport=CheckSyncReport(), long maxMsgSize=0, long maxObjSize=0, bool loSupport=false, const char *encoding="")
virtual void compareDatabases ()
virtual void deleteAll (DeleteAllMode mode=DELETE_ALL_SYNC)
virtual void doCopy ()
virtual void refreshClient ()
virtual void testTwoWaySync ()
virtual void testSlowSync ()
virtual void testRefreshFromServerSync ()
virtual void testRefreshFromClientSync ()
virtual void testDeleteAllSync ()
virtual void testDeleteAllRefresh ()
virtual void testRefreshSemantic ()
virtual void testRefreshStatus ()
void testCopy ()
virtual void testUpdate ()
virtual void testComplexUpdate ()
virtual void testDelete ()
virtual void testMerge ()
virtual void testTwinning ()
virtual void testOneWayFromServer ()
virtual void testOneWayFromClient ()
virtual void testItems ()
virtual void testAddUpdate ()
void testMaxMsg ()
void testLargeObject ()
void testLargeObjectBin ()
void testLargeObjectEncoded ()
virtual void testManyItems ()
virtual void doVarSizes (bool withMaxMsgSize, bool withLargeObject, const char *encoding)
virtual void sync (SyncMode syncMode, const std::string &logprefix="", CheckSyncReport checkReport=CheckSyncReport(), long maxMsgSize=0, long maxObjSize=0, bool loSupport=false, const char *encoding="")

Protected Attributes

std::vector< std::pair< int,
LocalTests * > > 
sources
int * sourceArray
SyncTestsaccessClientB


Detailed Description

Tests synchronization with one or more sync sources enabled. When testing multiple sources at once only the first config is checked to see which tests can be executed.

Definition at line 681 of file ClientTest.h.


Member Typedef Documentation

typedef std::vector< std::pair<int, LocalTests *> >::iterator SyncTests::source_it [protected]

Definition at line 679 of file ClientTest.h.

typedef std::vector< std::pair<int, LocalTests *> >::iterator SyncTests::source_it [protected]

Definition at line 695 of file ClientTest.h.


Member Enumeration Documentation

enum SyncTests::DeleteAllMode [protected]

Enumerator:
DELETE_ALL_SYNC  make sure client and server are in sync, delete locally, sync again
DELETE_ALL_REFRESH  delete locally, refresh server
DELETE_ALL_SYNC  make sure client and server are in sync, delete locally, sync again
DELETE_ALL_REFRESH  delete locally, refresh server

Definition at line 687 of file ClientTest.h.

enum SyncTests::DeleteAllMode [protected]

Enumerator:
DELETE_ALL_SYNC  make sure client and server are in sync, delete locally, sync again
DELETE_ALL_REFRESH  delete locally, refresh server
DELETE_ALL_SYNC  make sure client and server are in sync, delete locally, sync again
DELETE_ALL_REFRESH  delete locally, refresh server

Definition at line 703 of file ClientTest.h.


Constructor & Destructor Documentation

SyncTests::SyncTests ( const std::string &  name,
ClientTest cl,
std::vector< int >  sourceIndices,
bool  isClientA = true 
)

SyncTests::~SyncTests (  ) 


Member Function Documentation

virtual void SyncTests::addTests (  )  [virtual]

adds the supported tests to the instance itself

virtual void SyncTests::compareDatabases (  )  [protected, virtual]

compare databases of first and second client

virtual void SyncTests::deleteAll ( DeleteAllMode  mode = DELETE_ALL_SYNC  )  [protected, virtual]

deletes all items locally and on server

virtual void SyncTests::doCopy (  )  [protected, virtual]

get both clients in sync with empty server, then copy one item from client A to B

virtual void SyncTests::doVarSizes ( bool  withMaxMsgSize,
bool  withLargeObject,
const char *  encoding 
) [protected, virtual]

implements testMaxMsg(), testLargeObject(), testLargeObjectEncoded() using a sequence of items with varying sizes

virtual void SyncTests::refreshClient (  )  [protected, virtual]

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

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 = "" 
) [protected, virtual]

executes a sync with the given options, checks the result and (optionally) the sync report

virtual void SyncTests::testAddUpdate (  )  [protected, virtual]

virtual void SyncTests::testComplexUpdate (  )  [protected, virtual]

void SyncTests::testCopy (  )  [inline, protected]

Definition at line 741 of file ClientTest.h.

References compareDatabases(), and doCopy().

void SyncTests::testCopy (  )  [inline, protected]

Definition at line 757 of file ClientTest.h.

References compareDatabases(), and doCopy().

Referenced by addTests().

virtual void SyncTests::testDelete (  )  [protected, virtual]

virtual void SyncTests::testDeleteAllRefresh (  )  [protected, virtual]

virtual void SyncTests::testDeleteAllSync (  )  [inline, protected, virtual]

Definition at line 732 of file ClientTest.h.

References DELETE_ALL_SYNC, and deleteAll().

virtual void SyncTests::testDeleteAllSync (  )  [inline, protected, virtual]

Definition at line 748 of file ClientTest.h.

References DELETE_ALL_SYNC, and deleteAll().

virtual void SyncTests::testItems (  )  [protected, virtual]

void SyncTests::testLargeObject (  )  [inline, protected]

Definition at line 761 of file ClientTest.h.

References doVarSizes().

void SyncTests::testLargeObject (  )  [inline, protected]

Definition at line 777 of file ClientTest.h.

References doVarSizes().

Referenced by addTests().

void SyncTests::testLargeObjectBin (  )  [inline, protected]

Definition at line 765 of file ClientTest.h.

References doVarSizes().

void SyncTests::testLargeObjectBin (  )  [inline, protected]

Definition at line 781 of file ClientTest.h.

References doVarSizes().

Referenced by addTests().

void SyncTests::testLargeObjectEncoded (  )  [inline, protected]

Definition at line 769 of file ClientTest.h.

References doVarSizes().

void SyncTests::testLargeObjectEncoded (  )  [inline, protected]

Definition at line 785 of file ClientTest.h.

References doVarSizes().

Referenced by addTests().

virtual void SyncTests::testManyItems (  )  [protected, virtual]

void SyncTests::testMaxMsg (  )  [inline, protected]

Definition at line 757 of file ClientTest.h.

References doVarSizes().

void SyncTests::testMaxMsg (  )  [inline, protected]

Definition at line 773 of file ClientTest.h.

References doVarSizes().

Referenced by addTests().

virtual void SyncTests::testMerge (  )  [protected, virtual]

virtual void SyncTests::testOneWayFromClient (  )  [protected, virtual]

virtual void SyncTests::testOneWayFromServer (  )  [protected, virtual]

virtual void SyncTests::testRefreshFromClientSync (  )  [inline, protected, virtual]

Definition at line 727 of file ClientTest.h.

References sync().

virtual void SyncTests::testRefreshFromClientSync (  )  [inline, protected, virtual]

Definition at line 743 of file ClientTest.h.

References sync().

Referenced by addTests().

virtual void SyncTests::testRefreshFromServerSync (  )  [inline, protected, virtual]

Definition at line 722 of file ClientTest.h.

References sync().

virtual void SyncTests::testRefreshFromServerSync (  )  [inline, protected, virtual]

Definition at line 738 of file ClientTest.h.

References sync().

Referenced by addTests().

virtual void SyncTests::testRefreshSemantic (  )  [protected, virtual]

virtual void SyncTests::testRefreshStatus (  )  [protected, virtual]

virtual void SyncTests::testSlowSync (  )  [inline, protected, virtual]

Definition at line 718 of file ClientTest.h.

References sync().

virtual void SyncTests::testSlowSync (  )  [inline, protected, virtual]

Definition at line 734 of file ClientTest.h.

References sync().

Referenced by addTests().

virtual void SyncTests::testTwinning (  )  [protected, virtual]

virtual void SyncTests::testTwoWaySync (  )  [inline, protected, virtual]

Definition at line 713 of file ClientTest.h.

References sync().

virtual void SyncTests::testTwoWaySync (  )  [inline, protected, virtual]

Definition at line 729 of file ClientTest.h.

References sync().

Referenced by addTests().

virtual void SyncTests::testUpdate (  )  [protected, virtual]


Member Data Documentation

the client we are testing

Definition at line 684 of file ClientTest.h.

Referenced by addTests(), sync(), and SyncTests().

int * SyncTests::sourceArray [protected]

the indices from sources, terminated by -1 (for sync())

Definition at line 698 of file ClientTest.h.

Referenced by sync(), SyncTests(), and ~SyncTests().

std::vector< std::pair< int, LocalTests * > > SyncTests::sources [protected]


The documentation for this class was generated from the following files:

Generated on Sat Oct 18 17:17:06 2008 for SyncEvolution and Funambol by  doxygen 1.5.7.1