Top | ![]() |
![]() |
![]() |
![]() |
#define | E_TEST_SERVER_UTILS_SERVICE() |
void | (*ETestSourceCustomizeFunc) () |
void | e_test_server_utils_setup () |
void | e_test_server_utils_teardown () |
gint | e_test_server_utils_run () |
gint | e_test_server_utils_run_full () |
void | e_test_server_utils_prepare_run () |
void | e_test_server_utils_finish_run () |
enum | ETestServiceType |
struct | ETestServerClosure |
ETestService | |
struct | ETestServerFixture |
enum | ETestServerFlags |
This test fixture provides an encapsulated testing environment for test cases to test EBookClient and ECalClient.
The ETestServerFixture should be used as a fixture and must be coupled with the ETestServerClosure to configure how the test fixture will operate.
Both the ETestServerFixture and ETestServerClosure can be extended with
more complex test fixtures, which must remember to call e_test_server_utils_setup()
and e_test_server_utils_teardown()
in thier fixture's setup and teardown routines.
#define E_TEST_SERVER_UTILS_SERVICE(fixture, service_type)
A convenience macro to fetch the service for a given test case:
1 |
EBookClient *book = E_TEST_SERVER_UTILS_SERVICE (fixture, EBookClient); |
void (*ETestSourceCustomizeFunc) (ESource *scratch
,ETestServerClosure *closure
);
This can be used to parameterize the addressbook or calendar scratch
ESource
before creating/committing it.
scratch |
The scratch ESource template being used to create an addressbook or calendar |
|
closure |
The ETestServerClosure for this test case |
void e_test_server_utils_setup (ETestServerFixture *fixture
,gconstpointer user_data
);
A setup function for the ETestServerFixture fixture
void e_test_server_utils_teardown (ETestServerFixture *fixture
,gconstpointer user_data
);
A teardown function for the ETestServerFixture fixture
The type of service to test
Only the ESourceRegistry will be created |
||
An EBookClient will be created and opened for the test |
||
An EBookClient in direct read access mode will be created and opened for the test |
||
An ECalClient will be created and opened for the test |
||
An EBook will be created and opened for the test |
struct ETestServerClosure { ETestServiceType type; ETestSourceCustomizeFunc customize; ECalClientSourceType calendar_source_type; gboolean keep_work_directory; GDestroyNotify destroy_closure_func; gboolean use_async_connect; };
This structure provides the parameters for the ETestServerFixture tests, it can be included as the first member of a derived structure for any tests deriving from the ETestServerFixture test type
ETestServiceType |
An ETestServiceType, type of the service |
|
ETestSourceCustomizeFunc |
An ETestSourceCustomizeFunc to use to parameterize the scratch ESource, or |
|
ECalClientSourceType |
An ECalClientSourceType for |
|
If specified, the work directory will not be deleted between tests |
||
A function to destroy an allocated ETestServerClosure, this it typically used by sub-fixtures which embed this structure in their closures. |
||
Specifies whether a synchronous or asyncrhonous API should be used to create the EClient you plan to test. |
A union of service types, holds the object to test in a ETestServerFixture.
A generic pointer for the test service. |
||
EBookClient * |
An EBookClient, created for |
|
ECalClient * |
An ECalClient, created for |
|
EBook * |
An EBook, created for |
struct ETestServerFixture { GMainLoop *loop; GTestDBus *dbus; ESourceRegistry *registry; ETestService service; gchar *source_name; };
A fixture for running tests on the Evolution Data Server components in an encapsulated D-Bus environment.
A Main loop to run traffic in |
||
The D-Bus test scaffold |
||
ESourceRegistry * |
||
ETestService |
The ETestService |
|
This can be given an allocated string before calling |