Changeset 2564

Show
Ignore:
Timestamp:
02/07/06 01:04:32
Author:
chipx86
Message:

Beef up the unit tests by registering as a feed and ensuring that objects can be created with valid returned object paths.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libgalago/protocol-cleanup/ChangeLog

    r2562 r2564  
     1Tue Feb 07 01:04:02 PST 2006  Christian Hammond <chipx86@chipx86.com> 
     2 
     3    * tests/check-libgalago.c: 
     4      - Beef up the unit tests by registering as a feed and ensuring that 
     5        objects can be created with valid returned object paths. 
     6 
    17Tue Feb 07 00:48:17 PST 2006  Christian Hammond <chipx86@chipx86.com> 
    28 
  • branches/libgalago/protocol-cleanup/tests/check-libgalago.c

    r2366 r2564  
    8585START_TEST(test_create_person) 
    8686{ 
    87     galago_init("check-libgalago", FALSE); 
    88     fail_unless(make_dummy_person() != NULL, "Unable to create person"); 
     87    GalagoPerson *person; 
     88 
     89    galago_init("check-libgalago", TRUE); 
     90 
     91    person = make_dummy_person(); 
     92    fail_unless(person != NULL, "Unable to create person"); 
     93    fail_unless(galago_object_get_dbus_path(GALAGO_OBJECT(person)) != NULL, 
     94                "Object path not set on the new person"); 
    8995} 
    9096END_TEST 
     
    9298START_TEST(test_create_service) 
    9399{ 
    94     galago_init("check-libgalago", FALSE); 
    95     fail_unless(make_dummy_service() != NULL, "Unable to create service"); 
     100    GalagoService *service; 
     101 
     102    galago_init("check-libgalago", TRUE); 
     103 
     104    service = make_dummy_service(); 
     105    fail_unless(service != NULL, "Unable to create service"); 
     106    fail_unless(galago_object_get_dbus_path(GALAGO_OBJECT(service)) != NULL, 
     107                "Object path not set on the new service"); 
    96108} 
    97109END_TEST 
     
    99111START_TEST(test_create_account) 
    100112{ 
    101     galago_init("check-libgalago", FALSE); 
    102     fail_unless(make_dummy_account() != NULL, "Unable to create account"); 
     113    GalagoAccount *account; 
     114 
     115    galago_init("check-libgalago", TRUE); 
     116 
     117    account = make_dummy_account(); 
     118    fail_unless(account != NULL, "Unable to create account"); 
     119    fail_unless(galago_object_get_dbus_path(GALAGO_OBJECT(account)) != NULL, 
     120                "Object path not set on the new account"); 
     121
     122END_TEST 
     123 
     124START_TEST(test_create_presence) 
     125
     126    GalagoPresence *presence; 
     127 
     128    galago_init("check-libgalago", TRUE); 
     129 
     130    presence = make_dummy_presence(); 
     131    fail_unless(presence != NULL, "Unable to create presence"); 
     132    fail_unless(galago_object_get_dbus_path(GALAGO_OBJECT(presence)) != NULL, 
     133                "Object path not set on the new presence"); 
    103134} 
    104135END_TEST 
     
    287318    ADD_TCASE("create_service", test_create_service); 
    288319    ADD_TCASE("create_account", test_create_account); 
     320    ADD_TCASE("create_presence", test_create_presence); 
    289321 
    290322    /* Test D-BUS object signature support */