[folks] tests: Port the remaining tests to use individuals_changed_detailed
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] tests: Port the remaining tests to use individuals_changed_detailed
- Date: Sun, 4 Sep 2011 16:36:19 +0000 (UTC)
commit 8a4d6afc237e9ea1a3b845bd32ed41b48795c58b
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Aug 29 21:59:02 2011 +0100
tests: Port the remaining tests to use individuals_changed_detailed
Helps: bgo#657282
tests/eds/add-contacts-stress-test.vala | 22 +++++++----
tests/eds/add-persona.vala | 20 ++++++----
tests/eds/avatar-details.vala | 21 ++++++----
tests/eds/email-details.vala | 22 +++++++----
tests/eds/im-details.vala | 22 +++++++----
tests/eds/individual-retrieval.vala | 22 +++++++----
tests/eds/link-personas.vala | 27 ++++++++----
tests/eds/name-details.vala | 22 +++++++----
tests/eds/phone-details.vala | 22 +++++++----
tests/eds/postal-address-details.vala | 22 +++++++----
tests/eds/remove-persona.vala | 23 +++++++---
tests/eds/removing-contacts.vala | 23 +++++++---
tests/eds/set-avatar.vala | 22 +++++++----
tests/eds/set-birthday.vala | 22 +++++++----
tests/eds/set-emails.vala | 22 +++++++----
tests/eds/set-gender.vala | 22 +++++++----
tests/eds/set-im-addresses.vala | 22 +++++++----
tests/eds/set-names.vala | 24 +++++++----
tests/eds/set-notes.vala | 22 +++++++----
tests/eds/set-phones.vala | 22 +++++++----
tests/eds/set-postal-addresses.vala | 22 +++++++----
tests/eds/set-properties-race.vala | 22 +++++++----
tests/eds/set-structured-name.vala | 22 +++++++----
tests/eds/set-urls.vala | 22 +++++++----
tests/eds/updating-contacts.vala | 22 +++++++----
tests/key-file/individual-retrieval.vala | 25 ++++++++++--
tests/libsocialweb/aggregation.vala | 33 +++++++++++++--
tests/libsocialweb/dummy-lsw.vala | 32 ++++++++++++---
tests/telepathy/individual-properties.vala | 42 +++++++++++++++++---
tests/telepathy/individual-retrieval.vala | 31 ++++++++++++--
tests/tracker/add-contact.vala | 22 +++++++----
tests/tracker/add-persona.vala | 22 +++++++----
tests/tracker/additional-names-updates.vala | 22 +++++++----
tests/tracker/avatar-details-interface.vala | 22 +++++++---
tests/tracker/avatar-updates.vala | 22 +++++++----
tests/tracker/birthday-details-interface.vala | 23 +++++++----
tests/tracker/birthday-updates.vala | 23 +++++++----
tests/tracker/default-contact.vala | 22 +++++++----
tests/tracker/duplicated-emails.vala | 22 +++++++----
tests/tracker/duplicated-phones.vala | 22 +++++++----
tests/tracker/email-details-interface.vala | 24 +++++++----
tests/tracker/emails-updates.vala | 22 +++++++----
tests/tracker/family-name-updates.vala | 22 +++++++----
tests/tracker/favourite-details-interface.vala | 24 +++++++----
tests/tracker/favourite-updates.vala | 22 +++++++----
tests/tracker/fullname-updates.vala | 22 +++++++----
tests/tracker/gender-details-interface.vala | 23 +++++++----
tests/tracker/given-name-updates.vala | 22 +++++++----
tests/tracker/im-details-interface.vala | 24 +++++++----
tests/tracker/imaddresses-updates.vala | 22 +++++++----
tests/tracker/individual-retrieval.vala | 22 +++++++----
tests/tracker/link-personas-via-local-ids.vala | 29 +++++++++----
tests/tracker/link-personas.vala | 29 +++++++++----
tests/tracker/match-all.vala | 22 +++++++----
tests/tracker/match-email-addresses.vala | 22 +++++++----
tests/tracker/match-im-addresses.vala | 22 +++++++----
tests/tracker/match-known-emails.vala | 22 +++++++----
tests/tracker/match-name.vala | 22 +++++++----
tests/tracker/match-phone-number.vala | 22 +++++++----
tests/tracker/name-details-interface.vala | 24 +++++++----
tests/tracker/nickname-updates.vala | 22 +++++++----
tests/tracker/note-details-interface.vala | 22 +++++++----
tests/tracker/phone-details-interface.vala | 24 +++++++----
tests/tracker/phones-updates.vala | 23 +++++++----
.../tracker/postal-address-details-interface.vala | 22 +++++++----
tests/tracker/prefix-name-updates.vala | 23 +++++++----
tests/tracker/remove-contact.vala | 25 ++++++++----
tests/tracker/remove-persona.vala | 23 +++++++---
tests/tracker/role-details-interface.vala | 22 +++++++----
tests/tracker/set-avatar.vala | 22 +++++++----
tests/tracker/set-birthday.vala | 22 +++++++----
tests/tracker/set-duplicate-email.vala | 23 +++++++----
tests/tracker/set-emails.vala | 22 +++++++----
tests/tracker/set-favourite.vala | 22 +++++++----
tests/tracker/set-full-name.vala | 22 +++++++----
tests/tracker/set-gender.vala | 22 +++++++----
tests/tracker/set-im-addresses.vala | 22 +++++++----
tests/tracker/set-nickname.vala | 22 +++++++----
tests/tracker/set-notes.vala | 22 +++++++----
tests/tracker/set-null-avatar.vala | 22 +++++++----
tests/tracker/set-phones.vala | 22 +++++++----
tests/tracker/set-postal-addresses.vala | 22 +++++++----
tests/tracker/set-roles.vala | 22 +++++++----
tests/tracker/set-structured-name.vala | 22 +++++++----
tests/tracker/set-urls.vala | 22 +++++++----
tests/tracker/suffix-name-updates.vala | 22 +++++++----
tests/tracker/url-details-interface.vala | 24 +++++++----
tests/tracker/website-updates.vala | 22 +++++++----
88 files changed, 1336 insertions(+), 695 deletions(-)
---
diff --git a/tests/eds/add-contacts-stress-test.vala b/tests/eds/add-contacts-stress-test.vala
index 024bcfb..a0078c0 100644
--- a/tests/eds/add-contacts-stress-test.vala
+++ b/tests/eds/add-contacts-stress-test.vala
@@ -91,7 +91,7 @@ public class AddContactsStressTestTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -142,20 +142,26 @@ public class AddContactsStressTestTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
assert (this._contacts_found.lookup (i.full_name) == false);
this._contacts_found.replace (i.full_name, true);
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
this._exit_if_all_contacts_found ();
}
diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala
index 8301256..93d7efb 100644
--- a/tests/eds/add-persona.vala
+++ b/tests/eds/add-persona.vala
@@ -122,7 +122,7 @@ public class AddPersonaTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -251,21 +251,25 @@ public class AddPersonaTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
uint num_replaces = 0;
foreach (var i in added)
{
+ if (i == null)
+ {
+ continue;
+ }
+
num_replaces = this._track_individual (i);
}
- assert (removed.size <= num_replaces);
+ assert (removed.size <= num_replaces + 1);
}
private uint _track_individual (Individual i)
diff --git a/tests/eds/avatar-details.vala b/tests/eds/avatar-details.vala
index 06b6128..b3585ef 100644
--- a/tests/eds/avatar-details.vala
+++ b/tests/eds/avatar-details.vala
@@ -89,7 +89,7 @@ public class AvatarDetailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -101,18 +101,23 @@ public class AvatarDetailsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
foreach (Individual i in added)
{
+ assert (i != null);
+
assert (i.personas.size == 1);
if (i.full_name == "bernie h. innocenti")
diff --git a/tests/eds/email-details.vala b/tests/eds/email-details.vala
index 2bcdbe0..8defe35 100644
--- a/tests/eds/email-details.vala
+++ b/tests/eds/email-details.vala
@@ -128,7 +128,7 @@ public class EmailDetailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -140,15 +140,16 @@ public class EmailDetailsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
unowned Gee.HashMap<string, Value?> contact = null;
assert (i.personas.size == 1);
@@ -193,7 +194,12 @@ public class EmailDetailsTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/eds/im-details.vala b/tests/eds/im-details.vala
index d7dd449..f78b87b 100644
--- a/tests/eds/im-details.vala
+++ b/tests/eds/im-details.vala
@@ -99,7 +99,7 @@ public class ImDetailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -111,15 +111,16 @@ public class ImDetailsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = i.full_name;
if (full_name == this._fullname)
{
@@ -149,7 +150,12 @@ public class ImDetailsTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
if (this._num_addrs == 2 &&
this._found_addr_1 == true &&
diff --git a/tests/eds/individual-retrieval.vala b/tests/eds/individual-retrieval.vala
index e0f8737..5f0262f 100644
--- a/tests/eds/individual-retrieval.vala
+++ b/tests/eds/individual-retrieval.vala
@@ -96,7 +96,7 @@ public class IndividualRetrievalTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -108,15 +108,16 @@ public class IndividualRetrievalTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
assert (i.personas.size == 1);
this._found_individuals.add (i.id);
}
@@ -126,7 +127,12 @@ public class IndividualRetrievalTests : Folks.TestCase
this._main_loop.quit ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/eds/link-personas.vala b/tests/eds/link-personas.vala
index f6be147..ba6afe9 100644
--- a/tests/eds/link-personas.vala
+++ b/tests/eds/link-personas.vala
@@ -174,7 +174,7 @@ public class LinkPersonasTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -304,20 +304,29 @@ public class LinkPersonasTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ if (i == null)
+ {
+ continue;
+ }
+
this._check_personas (i);
}
- if (removed.size > 0)
- this._removed_individuals += (int) removed.size;
+ foreach (var i in removed)
+ {
+ if (i != null)
+ {
+ this._removed_individuals++;
+ }
+ }
}
/* As mentioned in _add_personas here we actually check
diff --git a/tests/eds/name-details.vala b/tests/eds/name-details.vala
index a47e2f8..313457e 100644
--- a/tests/eds/name-details.vala
+++ b/tests/eds/name-details.vala
@@ -118,7 +118,7 @@ public class NameDetailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -130,15 +130,16 @@ public class NameDetailsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
string s;
assert (i.personas.size == 1);
@@ -197,7 +198,12 @@ public class NameDetailsTests : Folks.TestCase
this._names_count++;
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
if (this._c1.size == 0 &&
this._c2.size == 0)
diff --git a/tests/eds/phone-details.vala b/tests/eds/phone-details.vala
index 4c871c3..dd43c2f 100644
--- a/tests/eds/phone-details.vala
+++ b/tests/eds/phone-details.vala
@@ -120,7 +120,7 @@ public class PhoneDetailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -132,15 +132,16 @@ public class PhoneDetailsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
unowned Gee.HashMap<string, Value?> contact = null;
assert (i.personas.size == 1);
@@ -197,7 +198,12 @@ public class PhoneDetailsTests : Folks.TestCase
this._main_loop.quit ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/eds/postal-address-details.vala b/tests/eds/postal-address-details.vala
index 55b2597..1c009af 100644
--- a/tests/eds/postal-address-details.vala
+++ b/tests/eds/postal-address-details.vala
@@ -120,7 +120,7 @@ public class PostalAddressDetailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -133,15 +133,16 @@ public class PostalAddressDetailsTests : Folks.TestCase
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._fullname)
{
foreach (var pa_fd in i.postal_addresses)
@@ -161,7 +162,12 @@ public class PostalAddressDetailsTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/eds/remove-persona.vala b/tests/eds/remove-persona.vala
index 476e3af..3865e8d 100644
--- a/tests/eds/remove-persona.vala
+++ b/tests/eds/remove-persona.vala
@@ -82,7 +82,7 @@ public class RemovePersonaTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -142,15 +142,19 @@ public class RemovePersonaTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ if (i == null)
+ {
+ continue;
+ }
+
if (i.full_name == this._persona_fullname)
{
this._individual_id = i.id;
@@ -173,6 +177,11 @@ public class RemovePersonaTests : Folks.TestCase
foreach (var i in removed)
{
+ if (i == null)
+ {
+ continue;
+ }
+
if (i.id == this._individual_id)
{
this._individual_removed = true;
diff --git a/tests/eds/removing-contacts.vala b/tests/eds/removing-contacts.vala
index 50009f9..09c2c29 100644
--- a/tests/eds/removing-contacts.vala
+++ b/tests/eds/removing-contacts.vala
@@ -85,7 +85,7 @@ public class RemovingContactsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -97,15 +97,19 @@ public class RemovingContactsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ if (i == null)
+ {
+ continue;
+ }
+
var name = (Folks.NameDetails) i;
this._added = true;
assert (name.full_name == "bernie h. innocenti");
@@ -114,6 +118,11 @@ public class RemovingContactsTests : Folks.TestCase
foreach (Individual i in removed)
{
+ if (i == null)
+ {
+ continue;
+ }
+
var name = (Folks.NameDetails) i;
assert (name.full_name == "bernie h. innocenti");
this._removed = true;
diff --git a/tests/eds/set-avatar.vala b/tests/eds/set-avatar.vala
index afa493d..55559e3 100644
--- a/tests/eds/set-avatar.vala
+++ b/tests/eds/set-avatar.vala
@@ -88,7 +88,7 @@ public class SetAvatarTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -100,15 +100,16 @@ public class SetAvatarTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -123,7 +124,12 @@ public class SetAvatarTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_avatar_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/eds/set-birthday.vala b/tests/eds/set-birthday.vala
index fc13ae6..a618c49 100644
--- a/tests/eds/set-birthday.vala
+++ b/tests/eds/set-birthday.vala
@@ -86,7 +86,7 @@ public class SetBirthdayTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -98,15 +98,16 @@ public class SetBirthdayTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "John McClane")
@@ -122,7 +123,12 @@ public class SetBirthdayTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_birthday_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/eds/set-emails.vala b/tests/eds/set-emails.vala
index 7fd369e..44082ed 100644
--- a/tests/eds/set-emails.vala
+++ b/tests/eds/set-emails.vala
@@ -85,7 +85,7 @@ public class SetEmailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -97,15 +97,16 @@ public class SetEmailsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -126,7 +127,12 @@ public class SetEmailsTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_emails_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/eds/set-gender.vala b/tests/eds/set-gender.vala
index 8e67320..09cccca 100644
--- a/tests/eds/set-gender.vala
+++ b/tests/eds/set-gender.vala
@@ -87,7 +87,7 @@ public class SetGenderTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect (
+ this._aggregator.individuals_changed_detailed.connect (
this._individuals_changed_cb);
try
{
@@ -99,17 +99,16 @@ public class SetGenderTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
- assert (removed.size == 0);
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "jimmy neutron")
@@ -126,6 +125,13 @@ public class SetGenderTests : Folks.TestCase
}
}
}
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _gender_changed_cb (
diff --git a/tests/eds/set-im-addresses.vala b/tests/eds/set-im-addresses.vala
index c199c81..d50258b 100644
--- a/tests/eds/set-im-addresses.vala
+++ b/tests/eds/set-im-addresses.vala
@@ -86,7 +86,7 @@ public class SetIMAddressesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -98,15 +98,16 @@ public class SetIMAddressesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -127,7 +128,12 @@ public class SetIMAddressesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_im_addresses_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/eds/set-names.vala b/tests/eds/set-names.vala
index 92007f3..bde0e59 100644
--- a/tests/eds/set-names.vala
+++ b/tests/eds/set-names.vala
@@ -95,8 +95,8 @@ public class SetNamesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect (
- this._set_names_individuals_changed_cb);
+ this._aggregator.individuals_changed_detailed.connect (
+ this._individuals_changed_cb);
try
{
yield this._aggregator.prepare ();
@@ -107,15 +107,16 @@ public class SetNamesTests : Folks.TestCase
}
}
- private void _set_names_individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -141,7 +142,12 @@ public class SetNamesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _set_names_notify_full_name_cb (
diff --git a/tests/eds/set-notes.vala b/tests/eds/set-notes.vala
index 0ce96a9..b146af7 100644
--- a/tests/eds/set-notes.vala
+++ b/tests/eds/set-notes.vala
@@ -87,7 +87,7 @@ public class SetNotesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -99,15 +99,16 @@ public class SetNotesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -125,7 +126,12 @@ public class SetNotesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_notes_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/eds/set-phones.vala b/tests/eds/set-phones.vala
index aaebf84..fdd12a0 100644
--- a/tests/eds/set-phones.vala
+++ b/tests/eds/set-phones.vala
@@ -85,7 +85,7 @@ public class SetPhonesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -97,15 +97,16 @@ public class SetPhonesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -126,7 +127,12 @@ public class SetPhonesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_phones_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/eds/set-postal-addresses.vala b/tests/eds/set-postal-addresses.vala
index 4dbd648..d110ff4 100644
--- a/tests/eds/set-postal-addresses.vala
+++ b/tests/eds/set-postal-addresses.vala
@@ -92,7 +92,7 @@ public class SetPostalAddressesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -104,15 +104,16 @@ public class SetPostalAddressesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -135,7 +136,12 @@ public class SetPostalAddressesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_postal_addresses_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/eds/set-properties-race.vala b/tests/eds/set-properties-race.vala
index 0ea3698..83771cc 100644
--- a/tests/eds/set-properties-race.vala
+++ b/tests/eds/set-properties-race.vala
@@ -92,7 +92,7 @@ public class SetPropertiesRaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -104,15 +104,16 @@ public class SetPropertiesRaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -135,7 +136,12 @@ public class SetPropertiesRaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_postal_addresses_cb (Object persona_obj, ParamSpec ps)
diff --git a/tests/eds/set-structured-name.vala b/tests/eds/set-structured-name.vala
index 31f7331..5b023bf 100644
--- a/tests/eds/set-structured-name.vala
+++ b/tests/eds/set-structured-name.vala
@@ -88,7 +88,7 @@ public class SetStructuredNameTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -100,15 +100,16 @@ public class SetStructuredNameTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -124,7 +125,12 @@ public class SetStructuredNameTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_structured_name_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/eds/set-urls.vala b/tests/eds/set-urls.vala
index 7af273d..86f5dbd 100644
--- a/tests/eds/set-urls.vala
+++ b/tests/eds/set-urls.vala
@@ -100,7 +100,7 @@ public class SetUrlsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -112,17 +112,16 @@ public class SetUrlsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
- assert (removed.size == 0);
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "Albus Percival Wulfric Brian Dumbledore")
@@ -149,6 +148,13 @@ public class SetUrlsTests : Folks.TestCase
}
}
}
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_urls_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/eds/updating-contacts.vala b/tests/eds/updating-contacts.vala
index b03c5c4..7b702e3 100644
--- a/tests/eds/updating-contacts.vala
+++ b/tests/eds/updating-contacts.vala
@@ -85,7 +85,7 @@ public class UpdatingContactsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -97,15 +97,16 @@ public class UpdatingContactsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
var name = (Folks.NameDetails) i;
if (name.full_name == "bernie h. innocenti")
@@ -116,7 +117,12 @@ public class UpdatingContactsTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private async void _update_contact ()
diff --git a/tests/key-file/individual-retrieval.vala b/tests/key-file/individual-retrieval.vala
index 3235193..744e71e 100644
--- a/tests/key-file/individual-retrieval.vala
+++ b/tests/key-file/individual-retrieval.vala
@@ -66,10 +66,14 @@ public class IndividualRetrievalTests : Folks.TestCase
/* Set up the aggregator */
var aggregator = new IndividualAggregator ();
- aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
assert (i.personas.size == 1);
/* Using the display ID is a little hacky, since we strictly
@@ -81,7 +85,12 @@ public class IndividualRetrievalTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
});
aggregator.prepare ();
@@ -113,18 +122,26 @@ public class IndividualRetrievalTests : Folks.TestCase
/* Set up the aggregator */
var aggregator = new IndividualAggregator ();
uint individuals_changed_count = 0;
- aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
individuals_changed_count++;
assert (added.size == 1);
- assert (removed.size == 0);
+ assert (removed.size == 1);
/* Check properties */
foreach (var i in added)
{
assert (i.alias == "Brian Briansson");
}
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
});
aggregator.prepare ();
diff --git a/tests/libsocialweb/aggregation.vala b/tests/libsocialweb/aggregation.vala
index 8cf147d..ff1db31 100644
--- a/tests/libsocialweb/aggregation.vala
+++ b/tests/libsocialweb/aggregation.vala
@@ -176,11 +176,21 @@ public class AggregationTests : Folks.TestCase
var aggregator = new IndividualAggregator ();
Individual[] individual_gathered = new Individual[0];
- var handler_id = aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
+ var handler_id =
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+
debug ("initial individuals_changed");
foreach (Individual i in added)
- individual_gathered += i;
+ {
+ if (i == null)
+ {
+ continue;
+ }
+
+ individual_gathered += i;
+ }
if (individual_gathered.length >= 2)
main_loop.quit ();
});
@@ -204,20 +214,35 @@ public class AggregationTests : Folks.TestCase
&& ((Folks.NameDetails) individual_gathered[1]).nickname == "Gargantua"));
/* Check the result of link_personas */
- aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
debug ("individuals_changed after link: added:%u removed:%u",
added.size, removed.size);
- assert (added.size == 1);
+
+ assert (added.size == 2); /* should be identical */
assert (removed.size == 2);
+ Individual? added_ind = null;
+
foreach (var i in added)
{
+ assert (i != null);
+ assert (added_ind == null || added_ind == i);
+ added_ind = i;
+
assert (i.personas.size == 3);
debug ("individuals_changed: 1 individual containing %u personas",
i.personas.size);
}
+ foreach (var i in removed)
+ {
+ assert (i != null);
+ }
+
main_loop.quit ();
});
diff --git a/tests/libsocialweb/dummy-lsw.vala b/tests/libsocialweb/dummy-lsw.vala
index 9c122df..1734b54 100644
--- a/tests/libsocialweb/dummy-lsw.vala
+++ b/tests/libsocialweb/dummy-lsw.vala
@@ -138,12 +138,15 @@ public class DummyLswTests : Folks.TestCase
var aggregator = new IndividualAggregator ();
Individual? i1 = null;
Individual? i2 = null;
- var handler_id = aggregator.individuals_changed.connect (
- (added, removed, m, a, r) =>
+ var handler_id =
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
debug ("Aggregator got some data!");
assert (added.size == 2);
- assert (removed.size == 0);
+ assert (removed.size == 1);
foreach (var i in added)
{
string nickname = ((Folks.NameDetails) i).nickname;
@@ -152,6 +155,12 @@ public class DummyLswTests : Folks.TestCase
if (nickname == "Pantagruel")
i2 = i;
}
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
+
main_loop.quit ();
});
aggregator.prepare ();
@@ -258,17 +267,28 @@ public class DummyLswTests : Folks.TestCase
return false;
});
- handler_id = aggregator.individuals_changed.connect (
- (added, removed, m, a, r) =>
+ handler_id = aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
debug ("Aggregator deleted some data!");
- assert (added.size == 0);
+ assert (added.size == 2);
assert (removed.size == 2);
+
foreach (var i in removed)
{
+ assert (i != null);
+
string nickname = ((Folks.NameDetails) i).nickname;
debug ("deleted nickname: %s", nickname);
}
+
+ foreach (var i in added)
+ {
+ assert (i == null);
+ }
+
main_loop.quit ();
});
diff --git a/tests/telepathy/individual-properties.vala b/tests/telepathy/individual-properties.vala
index 0343a50..c5f222f 100644
--- a/tests/telepathy/individual-properties.vala
+++ b/tests/telepathy/individual-properties.vala
@@ -66,10 +66,15 @@ public class IndividualPropertiesTests : Folks.TestCase
/* Set up the aggregator */
var aggregator = new IndividualAggregator ();
- aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
{
+ assert (i != null);
+
/* We only check one (singleton Individual containing just
* olivier example com) */
if (i.id != "0e46c5e74f61908f49550d241f2a1651892a1695")
@@ -90,7 +95,12 @@ public class IndividualPropertiesTests : Folks.TestCase
assert (i.groups.contains ("Francophones") == true);
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
});
aggregator.prepare ();
@@ -116,12 +126,17 @@ public class IndividualPropertiesTests : Folks.TestCase
/* Set up the aggregator */
var aggregator = new IndividualAggregator ();
- aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
var new_alias = "New Alias";
foreach (Individual i in added)
{
+ assert (i != null);
+
/* We only check one (singleton Individual containing just
* olivier example com) */
if (i.id != "0e46c5e74f61908f49550d241f2a1651892a1695")
@@ -157,7 +172,12 @@ public class IndividualPropertiesTests : Folks.TestCase
((Tpf.Persona) persona).alias = new_alias;
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
});
aggregator.prepare ();
@@ -185,12 +205,17 @@ public class IndividualPropertiesTests : Folks.TestCase
/* Set up the aggregator */
var aggregator = new IndividualAggregator ();
- aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
var new_alias = "New Alias";
foreach (Individual i in added)
{
+ assert (i != null);
+
/* We only check one (singleton Individual containing just
* olivier example com) */
if (i.id != "0e46c5e74f61908f49550d241f2a1651892a1695")
@@ -227,7 +252,12 @@ public class IndividualPropertiesTests : Folks.TestCase
this.tp_backend.connection.manager.set_alias (handle, new_alias);
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
});
aggregator.prepare ();
diff --git a/tests/telepathy/individual-retrieval.vala b/tests/telepathy/individual-retrieval.vala
index 03ab97c..f8d84b4 100644
--- a/tests/telepathy/individual-retrieval.vala
+++ b/tests/telepathy/individual-retrieval.vala
@@ -96,12 +96,23 @@ public class IndividualRetrievalTests : Folks.TestCase
/* Set up the aggregator */
var aggregator = new IndividualAggregator ();
- aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (Individual i in added)
- expected_individuals.remove (i.id);
+ {
+ assert (i != null);
+ expected_individuals.remove (i.id);
+ }
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
});
/* Kill the main loop after a few seconds. If there are still individuals
@@ -153,12 +164,17 @@ public class IndividualRetrievalTests : Folks.TestCase
/* Set up the aggregator */
var aggregator = new IndividualAggregator ();
- aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
+ aggregator.individuals_changed_detailed.connect ((changes) =>
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
/* implicitly ignore the default Individuals, since that's covered in
* other test(s) */
foreach (Individual i in added)
{
+ assert (i != null);
+
/* If the Individual contains a Persona with an ID we provided,
* mark it as recieved.
* This intentionally avoids assuming that the Individual's ID is
@@ -171,7 +187,12 @@ public class IndividualRetrievalTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
});
/* Kill the main loop after a few seconds. If there are still individuals
diff --git a/tests/tracker/add-contact.vala b/tests/tracker/add-contact.vala
index 39db742..1920bc5 100644
--- a/tests/tracker/add-contact.vala
+++ b/tests/tracker/add-contact.vala
@@ -77,7 +77,7 @@ public class AddContactTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
@@ -90,15 +90,16 @@ public class AddContactTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = i.full_name;
i.notify["full-name"].connect (this._notify_full_name_cb);
if (full_name != null)
@@ -111,7 +112,12 @@ public class AddContactTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_full_name_cb ()
diff --git a/tests/tracker/add-persona.vala b/tests/tracker/add-persona.vala
index 84d1edf..ee6b332 100644
--- a/tests/tracker/add-persona.vala
+++ b/tests/tracker/add-persona.vala
@@ -152,7 +152,7 @@ public class AddPersonaTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -324,15 +324,16 @@ public class AddPersonaTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.is_user == false)
{
/* NOTE:
@@ -372,7 +373,12 @@ public class AddPersonaTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/additional-names-updates.vala b/tests/tracker/additional-names-updates.vala
index 2621766..c559643 100644
--- a/tests/tracker/additional-names-updates.vala
+++ b/tests/tracker/additional-names-updates.vala
@@ -97,7 +97,7 @@ public class AdditionalNamesUpdatesTests : Folks.TestCase
{
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -109,15 +109,16 @@ public class AdditionalNamesUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (this._initial_fullname == i.full_name)
{
var additional_names = i.structured_name.additional_names;
@@ -134,7 +135,12 @@ public class AdditionalNamesUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_additional_names_cb (Object sname_obj, ParamSpec ps)
diff --git a/tests/tracker/avatar-details-interface.vala b/tests/tracker/avatar-details-interface.vala
index fe6cba8..cddb364 100644
--- a/tests/tracker/avatar-details-interface.vala
+++ b/tests/tracker/avatar-details-interface.vala
@@ -84,7 +84,7 @@ public class AvatarDetailsInterfaceTests : Folks.TestCase
/* Set up the aggregator */
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -96,15 +96,16 @@ public class AvatarDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = ((Folks.NameDetails) i).full_name;
if (full_name != null)
{
@@ -118,6 +119,13 @@ public class AvatarDetailsInterfaceTests : Folks.TestCase
}
}
}
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_avatar_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/avatar-updates.vala b/tests/tracker/avatar-updates.vala
index 9dfa881..d5b6d19 100644
--- a/tests/tracker/avatar-updates.vala
+++ b/tests/tracker/avatar-updates.vala
@@ -100,7 +100,7 @@ public class AvatarUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -112,15 +112,16 @@ public class AvatarUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._initial_fullname)
{
i.notify["avatar"].connect (this._notify_avatar_cb);
@@ -149,8 +150,13 @@ public class AvatarUpdatesTests : Folks.TestCase
}
}
+ }
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
}
}
diff --git a/tests/tracker/birthday-details-interface.vala b/tests/tracker/birthday-details-interface.vala
index ff45851..478cdd4 100644
--- a/tests/tracker/birthday-details-interface.vala
+++ b/tests/tracker/birthday-details-interface.vala
@@ -89,7 +89,7 @@ public class BirthdayDetailsInterfaceTests : Folks.TestCase
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -101,15 +101,16 @@ public class BirthdayDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._fullname)
{
i.notify["birthday"].connect (this._notify_birthday_cb);
@@ -123,7 +124,13 @@ public class BirthdayDetailsInterfaceTests : Folks.TestCase
}
}
}
- assert (removed.size == 0);
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
void _notify_birthday_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/birthday-updates.vala b/tests/tracker/birthday-updates.vala
index 317ef6c..604895a 100644
--- a/tests/tracker/birthday-updates.vala
+++ b/tests/tracker/birthday-updates.vala
@@ -107,7 +107,7 @@ public class BirthdayUpdatesTests : Folks.TestCase
yield store.prepare ();
/* Set up the aggregator */
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -119,15 +119,16 @@ public class BirthdayUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._initial_fullname)
{
i.notify["birthday"].connect (this._notify_birthday_cb);
@@ -141,7 +142,13 @@ public class BirthdayUpdatesTests : Folks.TestCase
}
}
}
- assert (removed.size == 0);
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
void _notify_birthday_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/default-contact.vala b/tests/tracker/default-contact.vala
index da8a198..ea3514e 100644
--- a/tests/tracker/default-contact.vala
+++ b/tests/tracker/default-contact.vala
@@ -86,7 +86,7 @@ public class DefaultContactTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -98,15 +98,16 @@ public class DefaultContactTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = i.full_name;
if (full_name != null && full_name == this._fullname_persona
&& i.is_user == false)
@@ -127,7 +128,12 @@ public class DefaultContactTests : Folks.TestCase
this._found_default_user)
this._main_loop.quit ();
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/duplicated-emails.vala b/tests/tracker/duplicated-emails.vala
index cc5395e..5e7e1de 100644
--- a/tests/tracker/duplicated-emails.vala
+++ b/tests/tracker/duplicated-emails.vala
@@ -77,7 +77,7 @@ public class DuplicatedEmailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -100,15 +100,16 @@ public class DuplicatedEmailsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname_1)
{
this._individual_id_1 = i.id;
@@ -125,7 +126,12 @@ public class DuplicatedEmailsTests : Folks.TestCase
this._main_loop.quit ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_pstore_cb (Object _pstore, ParamSpec ps)
diff --git a/tests/tracker/duplicated-phones.vala b/tests/tracker/duplicated-phones.vala
index 3c96e19..c8707ff 100644
--- a/tests/tracker/duplicated-phones.vala
+++ b/tests/tracker/duplicated-phones.vala
@@ -77,7 +77,7 @@ public class DuplicatedPhonesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -100,15 +100,16 @@ public class DuplicatedPhonesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname_1)
{
this._individual_id_1 = i.id;
@@ -125,7 +126,12 @@ public class DuplicatedPhonesTests : Folks.TestCase
this._main_loop.quit ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_pstore_cb (Object _pstore, ParamSpec ps)
diff --git a/tests/tracker/email-details-interface.vala b/tests/tracker/email-details-interface.vala
index 56cbb31..d74d16e 100644
--- a/tests/tracker/email-details-interface.vala
+++ b/tests/tracker/email-details-interface.vala
@@ -88,7 +88,7 @@ public class EmailDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -100,15 +100,16 @@ public class EmailDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = i.full_name;
if (full_name != null)
{
@@ -128,12 +129,17 @@ public class EmailDetailsInterfaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
-
if (this._found_email_1 &&
this._found_email_2 &&
this._num_emails == 2)
this._main_loop.quit ();
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/emails-updates.vala b/tests/tracker/emails-updates.vala
index 678e106..5a8e43b 100644
--- a/tests/tracker/emails-updates.vala
+++ b/tests/tracker/emails-updates.vala
@@ -112,7 +112,7 @@ public class EmailsUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -124,15 +124,16 @@ public class EmailsUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._initial_fullname_1)
{
this._individual_id = i.id;
@@ -172,7 +173,12 @@ public class EmailsUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_email_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/family-name-updates.vala b/tests/tracker/family-name-updates.vala
index d65fcff..8a7dc2b 100644
--- a/tests/tracker/family-name-updates.vala
+++ b/tests/tracker/family-name-updates.vala
@@ -96,7 +96,7 @@ public class FamilyNameUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -108,15 +108,16 @@ public class FamilyNameUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (this._initial_fullname == i.full_name)
{
i.structured_name.notify["family-name"].connect
@@ -132,7 +133,12 @@ public class FamilyNameUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_family_name_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/favourite-details-interface.vala b/tests/tracker/favourite-details-interface.vala
index a87ff1e..68108b2 100644
--- a/tests/tracker/favourite-details-interface.vala
+++ b/tests/tracker/favourite-details-interface.vala
@@ -102,7 +102,7 @@ public class FavouriteDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -114,15 +114,16 @@ public class FavouriteDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = i.full_name;
if (full_name != null)
{
@@ -144,12 +145,17 @@ public class FavouriteDetailsInterfaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
-
if (this._found_p1 &&
this._found_p2 &&
this._found_p3)
this._main_loop.quit ();
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/favourite-updates.vala b/tests/tracker/favourite-updates.vala
index bc01465..4bf6885 100644
--- a/tests/tracker/favourite-updates.vala
+++ b/tests/tracker/favourite-updates.vala
@@ -104,7 +104,7 @@ public class FavouriteUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -116,15 +116,16 @@ public class FavouriteUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._initial_fullname_1)
{
i.notify["is-favourite"].connect
@@ -148,7 +149,12 @@ public class FavouriteUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_favourite_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/fullname-updates.vala b/tests/tracker/fullname-updates.vala
index 589ab27..2902d89 100644
--- a/tests/tracker/fullname-updates.vala
+++ b/tests/tracker/fullname-updates.vala
@@ -94,7 +94,7 @@ public class FullnameUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -106,15 +106,16 @@ public class FullnameUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._initial_fullname)
{
i.notify["full-name"].connect (this._notify_full_name_cb);
@@ -125,7 +126,12 @@ public class FullnameUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_full_name_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/gender-details-interface.vala b/tests/tracker/gender-details-interface.vala
index 62ab78b..ee2414b 100644
--- a/tests/tracker/gender-details-interface.vala
+++ b/tests/tracker/gender-details-interface.vala
@@ -85,7 +85,7 @@ public class GenderDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -97,15 +97,16 @@ public class GenderDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._fullname)
{
i.notify["gender"].connect (this._notify_gender_cb);
@@ -116,7 +117,13 @@ public class GenderDetailsInterfaceTests : Folks.TestCase
}
}
}
- assert (removed.size == 0);
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
void _notify_gender_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/given-name-updates.vala b/tests/tracker/given-name-updates.vala
index d9403d2..ae0ca7a 100644
--- a/tests/tracker/given-name-updates.vala
+++ b/tests/tracker/given-name-updates.vala
@@ -95,7 +95,7 @@ public class GivenNameUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -107,15 +107,16 @@ public class GivenNameUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (this._initial_fullname == i.full_name)
{
i.structured_name.notify["given-name"].connect
@@ -131,7 +132,12 @@ public class GivenNameUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_given_name_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/im-details-interface.vala b/tests/tracker/im-details-interface.vala
index 726a536..9634abb 100644
--- a/tests/tracker/im-details-interface.vala
+++ b/tests/tracker/im-details-interface.vala
@@ -90,7 +90,7 @@ public class ImDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -102,15 +102,16 @@ public class ImDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = i.full_name;
if (full_name == this._fullname)
{
@@ -146,12 +147,17 @@ public class ImDetailsInterfaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
-
if (this._num_addrs == 2 &&
this._found_addr_1 == true &&
this._found_addr_2 == true)
this._main_loop.quit ();
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/imaddresses-updates.vala b/tests/tracker/imaddresses-updates.vala
index 39326c0..5220b4a 100644
--- a/tests/tracker/imaddresses-updates.vala
+++ b/tests/tracker/imaddresses-updates.vala
@@ -98,7 +98,7 @@ public class IMAddressesUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -110,15 +110,16 @@ public class IMAddressesUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._initial_fullname_1)
{
this._individual_id = i.id;
@@ -146,7 +147,12 @@ public class IMAddressesUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_im_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/individual-retrieval.vala b/tests/tracker/individual-retrieval.vala
index 1745ab4..f70cba3 100644
--- a/tests/tracker/individual-retrieval.vala
+++ b/tests/tracker/individual-retrieval.vala
@@ -81,7 +81,7 @@ public class IndividualRetrievalTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -93,15 +93,16 @@ public class IndividualRetrievalTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = ((Folks.NameDetails) i).full_name;
if (full_name != null)
{
@@ -121,7 +122,12 @@ public class IndividualRetrievalTests : Folks.TestCase
this._c2.size == 0)
this._main_loop.quit ();
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/link-personas-via-local-ids.vala b/tests/tracker/link-personas-via-local-ids.vala
index 71c73a8..14341d0 100644
--- a/tests/tracker/link-personas-via-local-ids.vala
+++ b/tests/tracker/link-personas-via-local-ids.vala
@@ -128,7 +128,7 @@ public class LinkPersonasViaLocalIDsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -188,15 +188,19 @@ public class LinkPersonasViaLocalIDsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ if (i == null)
+ {
+ continue;
+ }
+
/* Lets listen to notifications from those individuals
* which aren't the default (Tracker) user */
if (!i.is_user)
@@ -207,8 +211,15 @@ public class LinkPersonasViaLocalIDsTests : Folks.TestCase
}
}
- if (removed.size > 0)
- this._removed_individuals += (int) removed.size;
+ foreach (var i in removed)
+ {
+ if (i == null)
+ {
+ continue;
+ }
+
+ this._removed_individuals++;
+ }
}
private void _notify_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/link-personas.vala b/tests/tracker/link-personas.vala
index 277c0f4..21d35f5 100644
--- a/tests/tracker/link-personas.vala
+++ b/tests/tracker/link-personas.vala
@@ -132,7 +132,7 @@ public class LinkPersonasTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -208,15 +208,19 @@ public class LinkPersonasTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ if (i == null)
+ {
+ continue;
+ }
+
/* Lets listen to notifications from those individuals
* which aren't the default (Tracker) user */
if (!i.is_user)
@@ -227,8 +231,15 @@ public class LinkPersonasTests : Folks.TestCase
}
}
- if (removed.size > 0)
- this._removed_individuals += (int) removed.size;
+ foreach (var i in removed)
+ {
+ if (i == null)
+ {
+ continue;
+ }
+
+ this._removed_individuals++;
+ }
}
private void _notify_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/match-all.vala b/tests/tracker/match-all.vala
index 772b2a1..7a9f7f6 100644
--- a/tests/tracker/match-all.vala
+++ b/tests/tracker/match-all.vala
@@ -101,7 +101,7 @@ public class MatchAllTests : Folks.TestCase
if (this._aggregator == null)
{
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
}
@@ -126,15 +126,16 @@ public class MatchAllTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname_1)
{
this._individual_id_1 = i.id;
@@ -161,7 +162,12 @@ public class MatchAllTests : Folks.TestCase
this._try_match_all ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _try_match_all ()
diff --git a/tests/tracker/match-email-addresses.vala b/tests/tracker/match-email-addresses.vala
index baef5f9..6cd4871 100644
--- a/tests/tracker/match-email-addresses.vala
+++ b/tests/tracker/match-email-addresses.vala
@@ -78,7 +78,7 @@ public class MatchEmailAddressesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -101,15 +101,16 @@ public class MatchEmailAddressesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname_1)
{
this._individual_id_1 = i.id;
@@ -126,7 +127,12 @@ public class MatchEmailAddressesTests : Folks.TestCase
this._try_potential_match ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _try_potential_match ()
diff --git a/tests/tracker/match-im-addresses.vala b/tests/tracker/match-im-addresses.vala
index 5f57276..84e2199 100644
--- a/tests/tracker/match-im-addresses.vala
+++ b/tests/tracker/match-im-addresses.vala
@@ -78,7 +78,7 @@ public class MatchIMAddressesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -101,15 +101,16 @@ public class MatchIMAddressesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname_1)
{
this._individual_id_1 = i.id;
@@ -126,7 +127,12 @@ public class MatchIMAddressesTests : Folks.TestCase
this._try_potential_match ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _try_potential_match ()
diff --git a/tests/tracker/match-known-emails.vala b/tests/tracker/match-known-emails.vala
index d60ee6c..6c7fa9c 100644
--- a/tests/tracker/match-known-emails.vala
+++ b/tests/tracker/match-known-emails.vala
@@ -86,7 +86,7 @@ public class MatchKnownEmailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -109,15 +109,16 @@ public class MatchKnownEmailsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname_1)
{
this._individual_id_1 = i.id;
@@ -134,7 +135,12 @@ public class MatchKnownEmailsTests : Folks.TestCase
this._try_potential_match ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _try_potential_match ()
diff --git a/tests/tracker/match-name.vala b/tests/tracker/match-name.vala
index af28606..d8eeb42 100644
--- a/tests/tracker/match-name.vala
+++ b/tests/tracker/match-name.vala
@@ -139,7 +139,7 @@ public class MatchNameTests : Folks.TestCase
if (this._aggregator == null)
{
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
}
@@ -164,15 +164,16 @@ public class MatchNameTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname_1)
{
this._individual_id_1 = i.id;
@@ -189,7 +190,12 @@ public class MatchNameTests : Folks.TestCase
this._try_potential_match ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _try_potential_match ()
diff --git a/tests/tracker/match-phone-number.vala b/tests/tracker/match-phone-number.vala
index 528d6bd..d2c441d 100644
--- a/tests/tracker/match-phone-number.vala
+++ b/tests/tracker/match-phone-number.vala
@@ -80,7 +80,7 @@ public class MatchPhoneNumberTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -103,15 +103,16 @@ public class MatchPhoneNumberTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname_1)
{
this._individual_id_1 = i.id;
@@ -128,7 +129,12 @@ public class MatchPhoneNumberTests : Folks.TestCase
this._try_potential_match ();
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _try_potential_match ()
diff --git a/tests/tracker/name-details-interface.vala b/tests/tracker/name-details-interface.vala
index 3ab9219..a351d93 100644
--- a/tests/tracker/name-details-interface.vala
+++ b/tests/tracker/name-details-interface.vala
@@ -89,7 +89,7 @@ public class NameDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -101,15 +101,16 @@ public class NameDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = ((Folks.NameDetails) i).full_name;
if (full_name != null)
{
@@ -155,11 +156,16 @@ public class NameDetailsInterfaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
-
if (this._c1.size == 0 &&
this._c2.size == 0)
this._main_loop.quit ();
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/nickname-updates.vala b/tests/tracker/nickname-updates.vala
index 7ab2e5d..f400930 100644
--- a/tests/tracker/nickname-updates.vala
+++ b/tests/tracker/nickname-updates.vala
@@ -89,7 +89,7 @@ public class NicknameUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -101,15 +101,16 @@ public class NicknameUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._initial_fullname)
{
i.notify["nickname"].connect (this._notify_nickname_cb);
@@ -132,7 +133,12 @@ public class NicknameUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_nickname_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/note-details-interface.vala b/tests/tracker/note-details-interface.vala
index 74d8c1e..3702cb4 100644
--- a/tests/tracker/note-details-interface.vala
+++ b/tests/tracker/note-details-interface.vala
@@ -86,7 +86,7 @@ public class NoteDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -98,15 +98,16 @@ public class NoteDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._fullname)
{
i.notify["notes"].connect (this._notify_note_cb);
@@ -121,7 +122,12 @@ public class NoteDetailsInterfaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
void _notify_note_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/phone-details-interface.vala b/tests/tracker/phone-details-interface.vala
index 623e7bd..fd696d3 100644
--- a/tests/tracker/phone-details-interface.vala
+++ b/tests/tracker/phone-details-interface.vala
@@ -87,7 +87,7 @@ public class PhoneDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -99,15 +99,16 @@ public class PhoneDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = i.full_name;
if (full_name != null)
{
@@ -127,12 +128,17 @@ public class PhoneDetailsInterfaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
-
if (this._num_phones == 2 &&
this._found_phone_1 == true &&
this._found_phone_2 == true)
this._main_loop.quit ();
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/phones-updates.vala b/tests/tracker/phones-updates.vala
index 35679f1..3b95d1f 100644
--- a/tests/tracker/phones-updates.vala
+++ b/tests/tracker/phones-updates.vala
@@ -98,7 +98,7 @@ public class PhonesUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -110,15 +110,16 @@ public class PhonesUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._initial_fullname_1)
{
this._individual_id = i.id;
@@ -136,7 +137,13 @@ public class PhonesUpdatesTests : Folks.TestCase
}
}
}
- assert (removed.size == 0);
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_phones_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/postal-address-details-interface.vala b/tests/tracker/postal-address-details-interface.vala
index 1dddf50..83409ee 100644
--- a/tests/tracker/postal-address-details-interface.vala
+++ b/tests/tracker/postal-address-details-interface.vala
@@ -118,7 +118,7 @@ public class PostalAddressDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -131,15 +131,16 @@ public class PostalAddressDetailsInterfaceTests : Folks.TestCase
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._fullname)
{
foreach (var pafd in i.postal_addresses)
@@ -159,7 +160,12 @@ public class PostalAddressDetailsInterfaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/prefix-name-updates.vala b/tests/tracker/prefix-name-updates.vala
index e890a43..9aae7f9 100644
--- a/tests/tracker/prefix-name-updates.vala
+++ b/tests/tracker/prefix-name-updates.vala
@@ -95,7 +95,7 @@ public class PrefixNameUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -107,15 +107,16 @@ public class PrefixNameUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (this._initial_fullname == i.full_name)
{
var prefix_name = i.structured_name.prefixes;
@@ -130,7 +131,13 @@ public class PrefixNameUpdatesTests : Folks.TestCase
}
}
}
- assert (removed.size == 0);
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_prefix_name_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/remove-contact.vala b/tests/tracker/remove-contact.vala
index d91bfbb..99e2515 100644
--- a/tests/tracker/remove-contact.vala
+++ b/tests/tracker/remove-contact.vala
@@ -85,7 +85,7 @@ public class RemoveContactTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -97,15 +97,19 @@ public class RemoveContactTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ if (i == null)
+ {
+ continue;
+ }
+
string full_name = i.full_name;
if (full_name == this._persona_fullname)
{
@@ -119,8 +123,13 @@ public class RemoveContactTests : Folks.TestCase
}
}
- foreach (Individual i in added)
+ foreach (var i in removed)
{
+ if (i == null)
+ {
+ continue;
+ }
+
if (i.id == this._individual_id)
{
this._contact_removed = true;
diff --git a/tests/tracker/remove-persona.vala b/tests/tracker/remove-persona.vala
index 13216b3..252b304 100644
--- a/tests/tracker/remove-persona.vala
+++ b/tests/tracker/remove-persona.vala
@@ -83,7 +83,7 @@ public class RemovePersonaTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -156,15 +156,19 @@ public class RemovePersonaTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ if (i == null)
+ {
+ continue;
+ }
+
if (i.full_name == this._persona_fullname)
{
this._individual_id = i.id;
@@ -187,6 +191,11 @@ public class RemovePersonaTests : Folks.TestCase
foreach (var i in removed)
{
+ if (i == null)
+ {
+ continue;
+ }
+
if (i.id == this._individual_id)
{
this._individual_removed = true;
diff --git a/tests/tracker/role-details-interface.vala b/tests/tracker/role-details-interface.vala
index 9fa51e9..beea993 100644
--- a/tests/tracker/role-details-interface.vala
+++ b/tests/tracker/role-details-interface.vala
@@ -86,7 +86,7 @@ public class RoleDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -98,15 +98,16 @@ public class RoleDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._fullname)
{
foreach (var role_fd in i.roles)
@@ -123,7 +124,12 @@ public class RoleDetailsInterfaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/set-avatar.vala b/tests/tracker/set-avatar.vala
index 81b6b57..d371f9a 100644
--- a/tests/tracker/set-avatar.vala
+++ b/tests/tracker/set-avatar.vala
@@ -84,7 +84,7 @@ public class SetAvatarTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -96,15 +96,16 @@ public class SetAvatarTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["avatar"].connect (this._notify_avatar_cb);
@@ -116,7 +117,12 @@ public class SetAvatarTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_avatar_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-birthday.vala b/tests/tracker/set-birthday.vala
index 3fec54f..c14220c 100644
--- a/tests/tracker/set-birthday.vala
+++ b/tests/tracker/set-birthday.vala
@@ -89,7 +89,7 @@ public class SetBirthdayTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -101,15 +101,16 @@ public class SetBirthdayTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["birthday"].connect (this._notify_bday_cb);
@@ -125,7 +126,12 @@ public class SetBirthdayTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_bday_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-duplicate-email.vala b/tests/tracker/set-duplicate-email.vala
index 696ef8a..6619d33 100644
--- a/tests/tracker/set-duplicate-email.vala
+++ b/tests/tracker/set-duplicate-email.vala
@@ -78,7 +78,7 @@ public class SetDuplicateEmailTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -101,21 +101,28 @@ public class SetDuplicateEmailTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname_1)
{
this._reset_email_address (i);
}
}
- assert (removed.size == 0);
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _reset_email_address (Individual i)
diff --git a/tests/tracker/set-emails.vala b/tests/tracker/set-emails.vala
index 90b8584..c7e5720 100644
--- a/tests/tracker/set-emails.vala
+++ b/tests/tracker/set-emails.vala
@@ -88,7 +88,7 @@ public class SetEmailsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -100,15 +100,16 @@ public class SetEmailsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["email-addresses"].connect (this._notify_emails_cb);
@@ -128,7 +129,12 @@ public class SetEmailsTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_emails_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-favourite.vala b/tests/tracker/set-favourite.vala
index 58897a0..447c7dd 100644
--- a/tests/tracker/set-favourite.vala
+++ b/tests/tracker/set-favourite.vala
@@ -102,7 +102,7 @@ public class SetFavouriteTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -114,15 +114,16 @@ public class SetFavouriteTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
i.notify["is-favourite"].connect (this._notify_favourite_cb);
if (i.full_name == this._initial_fullname_1)
{
@@ -150,7 +151,12 @@ public class SetFavouriteTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_favourite_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-full-name.vala b/tests/tracker/set-full-name.vala
index 459cafb..73c5fb6 100644
--- a/tests/tracker/set-full-name.vala
+++ b/tests/tracker/set-full-name.vala
@@ -86,7 +86,7 @@ public class SetFullNameTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -98,15 +98,16 @@ public class SetFullNameTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
this._individual_id = i.id;
@@ -119,7 +120,12 @@ public class SetFullNameTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_full_name_cb (Object individual, ParamSpec ps)
diff --git a/tests/tracker/set-gender.vala b/tests/tracker/set-gender.vala
index 9c97119..f2af4b9 100644
--- a/tests/tracker/set-gender.vala
+++ b/tests/tracker/set-gender.vala
@@ -82,7 +82,7 @@ public class SetGenderTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -94,15 +94,16 @@ public class SetGenderTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["gender"].connect (this._notify_gender_cb);
@@ -114,7 +115,12 @@ public class SetGenderTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_gender_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-im-addresses.vala b/tests/tracker/set-im-addresses.vala
index cf5788b..36e6bbe 100644
--- a/tests/tracker/set-im-addresses.vala
+++ b/tests/tracker/set-im-addresses.vala
@@ -86,7 +86,7 @@ public class SetIMAddressesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -98,15 +98,16 @@ public class SetIMAddressesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["im-addresses"].connect (this._notify_im_addresses_cb);
@@ -131,7 +132,12 @@ public class SetIMAddressesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_im_addresses_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-nickname.vala b/tests/tracker/set-nickname.vala
index 647cde1..2bcc7b9 100644
--- a/tests/tracker/set-nickname.vala
+++ b/tests/tracker/set-nickname.vala
@@ -89,7 +89,7 @@ public class SetNicknameTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -101,15 +101,16 @@ public class SetNicknameTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
if (i.nickname == this._initial_nickname)
@@ -140,7 +141,12 @@ public class SetNicknameTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_nickname_cb (Object persona, ParamSpec ps)
diff --git a/tests/tracker/set-notes.vala b/tests/tracker/set-notes.vala
index 5633875..7db267b 100644
--- a/tests/tracker/set-notes.vala
+++ b/tests/tracker/set-notes.vala
@@ -85,7 +85,7 @@ public class SetNotesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -97,15 +97,16 @@ public class SetNotesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["notes"].connect (this._notify_notes_cb);
@@ -124,7 +125,12 @@ public class SetNotesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_notes_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-null-avatar.vala b/tests/tracker/set-null-avatar.vala
index fbbfe9b..3c12fa6 100644
--- a/tests/tracker/set-null-avatar.vala
+++ b/tests/tracker/set-null-avatar.vala
@@ -81,7 +81,7 @@ public class SetNullAvatarTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -93,15 +93,16 @@ public class SetNullAvatarTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
foreach (var p in i.personas)
@@ -112,7 +113,12 @@ public class SetNullAvatarTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private async void _set_null_avatar_async ()
diff --git a/tests/tracker/set-phones.vala b/tests/tracker/set-phones.vala
index 1af2d84..8f3ccb1 100644
--- a/tests/tracker/set-phones.vala
+++ b/tests/tracker/set-phones.vala
@@ -88,7 +88,7 @@ public class SetPhonesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -100,15 +100,16 @@ public class SetPhonesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual>? added,
- Set<Individual>? removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["phone-numbers"].connect (this._notify_phones_cb);
@@ -129,7 +130,12 @@ public class SetPhonesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_phones_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-postal-addresses.vala b/tests/tracker/set-postal-addresses.vala
index 1943679..374a276 100644
--- a/tests/tracker/set-postal-addresses.vala
+++ b/tests/tracker/set-postal-addresses.vala
@@ -94,7 +94,7 @@ public class SetPostalAddressesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -106,15 +106,16 @@ public class SetPostalAddressesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["postal-addresses"].connect (this._notify_postal_cb);
@@ -142,7 +143,12 @@ public class SetPostalAddressesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_postal_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-roles.vala b/tests/tracker/set-roles.vala
index bd20316..8d1de90 100644
--- a/tests/tracker/set-roles.vala
+++ b/tests/tracker/set-roles.vala
@@ -87,7 +87,7 @@ public class SetRolesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -99,15 +99,16 @@ public class SetRolesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["roles"].connect (this._notify_roles_cb);
@@ -128,7 +129,12 @@ public class SetRolesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_roles_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/set-structured-name.vala b/tests/tracker/set-structured-name.vala
index 62ee193..aeb943d 100644
--- a/tests/tracker/set-structured-name.vala
+++ b/tests/tracker/set-structured-name.vala
@@ -96,7 +96,7 @@ public class SetStructuredNameTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -108,15 +108,16 @@ public class SetStructuredNameTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
foreach (var p in i.personas)
@@ -127,7 +128,12 @@ public class SetStructuredNameTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_sname_cb (Object persona, ParamSpec ps)
diff --git a/tests/tracker/set-urls.vala b/tests/tracker/set-urls.vala
index 7682b14..aaa2337 100644
--- a/tests/tracker/set-urls.vala
+++ b/tests/tracker/set-urls.vala
@@ -83,7 +83,7 @@ public class SetURLsTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -95,15 +95,16 @@ public class SetURLsTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._persona_fullname)
{
i.notify["urls"].connect (this._notify_urls_cb);
@@ -128,7 +129,12 @@ public class SetURLsTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_urls_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/suffix-name-updates.vala b/tests/tracker/suffix-name-updates.vala
index 14b7aa9..078ed4c 100644
--- a/tests/tracker/suffix-name-updates.vala
+++ b/tests/tracker/suffix-name-updates.vala
@@ -97,7 +97,7 @@ public class SuffixNameUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -109,15 +109,16 @@ public class SuffixNameUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (this._initial_fullname == i.full_name)
{
var suffix_name = i.structured_name.suffixes;
@@ -133,7 +134,12 @@ public class SuffixNameUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_suffix_name_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/tracker/url-details-interface.vala b/tests/tracker/url-details-interface.vala
index 4eb7705..ef1f42f 100644
--- a/tests/tracker/url-details-interface.vala
+++ b/tests/tracker/url-details-interface.vala
@@ -91,7 +91,7 @@ public class UrlDetailsInterfaceTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -103,15 +103,16 @@ public class UrlDetailsInterfaceTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
string full_name = i.full_name;
if (full_name != null)
{
@@ -129,11 +130,16 @@ public class UrlDetailsInterfaceTests : Folks.TestCase
}
}
- assert (removed.size == 0);
-
if (this._found_blog &&
this._found_website)
this._main_loop.quit ();
+
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
}
diff --git a/tests/tracker/website-updates.vala b/tests/tracker/website-updates.vala
index 484de05..c1807b3 100644
--- a/tests/tracker/website-updates.vala
+++ b/tests/tracker/website-updates.vala
@@ -97,7 +97,7 @@ public class WebsiteUpdatesTests : Folks.TestCase
var store = BackendStore.dup ();
yield store.prepare ();
this._aggregator = new IndividualAggregator ();
- this._aggregator.individuals_changed.connect
+ this._aggregator.individuals_changed_detailed.connect
(this._individuals_changed_cb);
try
{
@@ -109,15 +109,16 @@ public class WebsiteUpdatesTests : Folks.TestCase
}
}
- private void _individuals_changed_cb
- (Set<Individual> added,
- Set<Individual> removed,
- string? message,
- Persona? actor,
- GroupDetails.ChangeReason reason)
+ private void _individuals_changed_cb (
+ MultiMap<Individual?, Individual?> changes)
{
+ var added = changes.get_values ();
+ var removed = changes.get_keys ();
+
foreach (var i in added)
{
+ assert (i != null);
+
if (i.full_name == this._initial_fullname)
{
i.notify["urls"].connect
@@ -143,7 +144,12 @@ public class WebsiteUpdatesTests : Folks.TestCase
}
}
- assert (removed.size == 0);
+ assert (removed.size == 1);
+
+ foreach (var i in removed)
+ {
+ assert (i == null);
+ }
}
private void _notify_website_cb (Object individual_obj, ParamSpec ps)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]