[folks] e-d-s: make address book uri a settable property in the test Backend



commit b5750b7b1e37a924984cce3e045b6a4f385feba8
Author: Raul Gutierrez Segales <rgs collabora co uk>
Date:   Wed Aug 31 17:01:11 2011 +0100

    e-d-s: make address book uri a settable property in the test Backend
    
    This allows us to instantiate multiple Backends, each one associated
    to a it's own address book, which comes in handy for tests involving
    multiple e-d-s PersonaStores.

 tests/eds/link-personas.vala |    2 +-
 tests/lib/eds/backend.vala   |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/tests/eds/link-personas.vala b/tests/eds/link-personas.vala
index 2085cf6..85cca6d 100644
--- a/tests/eds/link-personas.vala
+++ b/tests/eds/link-personas.vala
@@ -71,7 +71,7 @@ public class LinkPersonasTests : Folks.TestCase
       try
         {
           GConf.Value val = new GConf.Value (GConf.ValueType.STRING);
-          val.set_string ("eds:%s".printf (EdsTest.Backend.address_book_uri));
+          val.set_string ("eds:%s".printf (this._eds_backend.address_book_uri));
           this._gconf_client.set (this._folks_config_key, val);
         }
       catch (GLib.Error e)
diff --git a/tests/lib/eds/backend.vala b/tests/lib/eds/backend.vala
index eb3e96e..dd2c174 100644
--- a/tests/lib/eds/backend.vala
+++ b/tests/lib/eds/backend.vala
@@ -32,7 +32,6 @@ errordomain EdsTest.BackendSetupError
 
 public class EdsTest.Backend
 {
-  public const string address_book_uri = "local://test";
   private string _addressbook_name;
   private E.BookClient _addressbook;
   private GLib.List<string> _e_contacts;
@@ -40,6 +39,11 @@ public class EdsTest.Backend
   E.SourceGroup _source_group;
   E.Source _source;
 
+  public string address_book_uri
+    {
+      get; set; default = "local://test";
+    }
+
   public Backend ()
     {
       this._contacts = new GLib.List<Gee.HashMap<string, Value?>> ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]