~people-project/people-core/deep-refactoring

« back to all changes in this revision

Viewing changes to people-libs/people/base-test/test-contact-source-factory.vala

  • Committer: Ali Sabil
  • Date: 2009-01-29 23:42:18 UTC
  • Revision ID: ali.sabil@gmail.com-20090129234218-avnl7d1dr6rsyp9d
- Ported people-libs/people/base-test to use libcore

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
 
22
22
using People;
23
 
using People.Utils;
 
23
using Core.Async;
24
24
 
25
25
 
26
26
namespace People.Backend.Test {
27
27
 
28
 
        public abstract class ContactSourceFactory : TestIt.Suite {
 
28
        public abstract class ContactSourceFactory : Core.Trial.Suite {
29
29
                protected string backend_name = "Null";
30
30
                protected uint parameters_count = 0;
31
31
                protected string[] parameters_names;
71
71
                }
72
72
 
73
73
                private void test_request_contact_source_null_param () {
74
 
                        var op = contact_source_factory.request_contact_source (null);
75
 
                        op.add_callback (async_callback);
 
74
                        var async_result = contact_source_factory.request_contact_source (null);
 
75
                        async_result.add_callback (async_callback);
76
76
                        async_wait ();
77
77
 
78
78
                        try {
79
 
                                var cs = op.get_result ();
 
79
                                var cs = async_result.get ();
80
80
                                assert_true (cs != null);
81
81
                        } catch (Backend.Error e) {
82
82
                                success ();
85
85
                        failure ();
86
86
                }
87
87
 
88
 
                private void async_callback (AsyncOperation op, void* data) {
 
88
                private void async_callback (AsyncResult async_result) {
89
89
                        async_break ();
90
90
                }
91
91