/* remove-persona.c generated by valac 0.17.2.19-5f50d, the Vala compiler
 * generated from remove-persona.vala, do not modify */

/*
 * Copyright (C) 2011 Collabora Ltd.
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors: Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <folks-test.h>
#include <eds-test.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <gee.h>
#include <folks/folks-eds.h>


#define TYPE_REMOVE_PERSONA_TESTS (remove_persona_tests_get_type ())
#define REMOVE_PERSONA_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REMOVE_PERSONA_TESTS, RemovePersonaTests))
#define REMOVE_PERSONA_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REMOVE_PERSONA_TESTS, RemovePersonaTestsClass))
#define IS_REMOVE_PERSONA_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REMOVE_PERSONA_TESTS))
#define IS_REMOVE_PERSONA_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REMOVE_PERSONA_TESTS))
#define REMOVE_PERSONA_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REMOVE_PERSONA_TESTS, RemovePersonaTestsClass))

typedef struct _RemovePersonaTests RemovePersonaTests;
typedef struct _RemovePersonaTestsClass RemovePersonaTestsClass;
typedef struct _RemovePersonaTestsPrivate RemovePersonaTestsPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _eds_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (eds_test_backend_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _RemovePersonaTestsTestRemovePersonaAsyncData RemovePersonaTestsTestRemovePersonaAsyncData;
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _RemovePersonaTestsAddPersonaData RemovePersonaTestsAddPersonaData;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _RemovePersonaTests {
	FolksTestCase parent_instance;
	RemovePersonaTestsPrivate * priv;
};

struct _RemovePersonaTestsClass {
	FolksTestCaseClass parent_class;
};

struct _RemovePersonaTestsPrivate {
	GMainLoop* _main_loop;
	EdsTestBackend* _eds_backend;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname;
	gboolean _persona_removed;
	gboolean _individual_removed;
	gchar* _individual_id;
	FolksPersonaStore* _pstore;
	gchar* _persona_id;
	FolksIndividual* _individual;
	gboolean _added_persona;
};

struct _RemovePersonaTestsTestRemovePersonaAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RemovePersonaTests* self;
	FolksBackendStore* _tmp0_;
	FolksBackendStore* store;
	FolksIndividualAggregator* _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	GeeMap* _tmp4_;
	GeeMap* _tmp5_;
	GeeCollection* _tmp6_;
	GeeCollection* _tmp7_;
	GeeCollection* _tmp8_;
	GeeIterator* _tmp9_;
	GeeIterator* _tmp10_;
	GeeIterator* _backend_it;
	GeeIterator* _tmp11_;
	gboolean _tmp12_;
	GeeIterator* _tmp13_;
	gpointer _tmp14_;
	FolksBackend* backend;
	FolksBackend* _tmp15_;
	GeeMap* _tmp16_;
	GeeMap* _tmp17_;
	EdsTestBackend* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	gpointer _tmp21_;
	FolksPersonaStore* _tmp22_;
	FolksPersonaStore* _tmp23_;
	FolksPersonaStore* _tmp24_;
	GError* e;
	GError* _tmp25_;
	const gchar* _tmp26_;
	GError * _inner_error_;
};

struct _RemovePersonaTestsAddPersonaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RemovePersonaTests* self;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* details;
	GValue _tmp3_;
	GValue _tmp4_;
	GValue* _tmp5_;
	GValue* _tmp6_;
	GValue* v1;
	GValue* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	GValue* _tmp11_;
	FolksIndividualAggregator* _tmp12_;
	FolksPersonaStore* _tmp13_;
	FolksPersona* _tmp14_;
	FolksPersona* _tmp15_;
	GError* e;
	GError* _tmp16_;
	const gchar* _tmp17_;
	GError * _inner_error_;
};


static gpointer remove_persona_tests_parent_class = NULL;

GType remove_persona_tests_get_type (void) G_GNUC_CONST;
#define REMOVE_PERSONA_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_REMOVE_PERSONA_TESTS, RemovePersonaTestsPrivate))
enum  {
	REMOVE_PERSONA_TESTS_DUMMY_PROPERTY
};
RemovePersonaTests* remove_persona_tests_new (void);
RemovePersonaTests* remove_persona_tests_construct (GType object_type);
void remove_persona_tests_test_remove_persona (RemovePersonaTests* self);
static void _remove_persona_tests_test_remove_persona_folks_test_case_test_method (gpointer self);
static void remove_persona_tests_real_set_up (FolksTestCase* base);
static void remove_persona_tests_real_tear_down (FolksTestCase* base);
static void _remove_persona_tests_test_remove_persona_async (RemovePersonaTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _remove_persona_tests_test_remove_persona_finish (RemovePersonaTests* self, GAsyncResult* _res_);
static gboolean __lambda2_ (RemovePersonaTests* self);
static gboolean ___lambda2__gsource_func (gpointer self);
static void _remove_persona_tests_test_remove_persona_async_data_free (gpointer _data);
static gboolean _remove_persona_tests_test_remove_persona_async_co (RemovePersonaTestsTestRemovePersonaAsyncData* _data_);
static void _remove_persona_tests_test_remove_persona_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _remove_persona_tests_individuals_changed_cb (RemovePersonaTests* self, GeeMultiMap* changes);
static void __remove_persona_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _remove_persona_tests_notify_pstore_cb (RemovePersonaTests* self, GObject* _pstore, GParamSpec* ps);
static void __remove_persona_tests_notify_pstore_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _remove_persona_tests_try_to_add (RemovePersonaTests* self);
static void _remove_persona_tests_add_persona (RemovePersonaTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _remove_persona_tests_add_persona_finish (RemovePersonaTests* self, GAsyncResult* _res_);
static void _remove_persona_tests_add_persona_data_free (gpointer _data);
static gboolean _remove_persona_tests_add_persona_co (RemovePersonaTestsAddPersonaData* _data_);
static void _g_free0_ (gpointer var);
static void _vala_GValue_free (GValue* self);
static void __vala_GValue_free0_ (gpointer var);
static GValue* _g_value_dup (GValue* self);
static void _remove_persona_tests_add_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _remove_persona_tests_personas_cb (RemovePersonaTests* self);
static void __remove_persona_tests_personas_cb_folks_persona_store_personas_changed (FolksPersonaStore* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self);
static void remove_persona_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _remove_persona_tests_test_remove_persona_folks_test_case_test_method (gpointer self) {
#line 42 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	remove_persona_tests_test_remove_persona (self);
#line 195 "remove-persona.c"
}


RemovePersonaTests* remove_persona_tests_construct (GType object_type) {
	RemovePersonaTests * self = NULL;
#line 40 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self = (RemovePersonaTests*) folks_test_case_construct (object_type, "RemovePersonaTests");
#line 42 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test removing personas from e-d-s ", _remove_persona_tests_test_remove_persona_folks_test_case_test_method, self);
#line 38 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return self;
#line 207 "remove-persona.c"
}


RemovePersonaTests* remove_persona_tests_new (void) {
#line 38 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return remove_persona_tests_construct (TYPE_REMOVE_PERSONA_TESTS);
#line 214 "remove-persona.c"
}


static void remove_persona_tests_real_set_up (FolksTestCase* base) {
	RemovePersonaTests * self;
	EdsTestBackend* _tmp0_;
	EdsTestBackend* _tmp1_;
	EdsTestBackend* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_ = NULL;
	gchar* config_val;
#line 46 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self = (RemovePersonaTests*) base;
#line 48 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp0_ = eds_test_backend_new ();
#line 48 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 48 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self->priv->_eds_backend = _tmp0_;
#line 49 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp1_ = self->priv->_eds_backend;
#line 49 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	eds_test_backend_set_up (_tmp1_, FALSE, "test");
#line 52 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp2_ = self->priv->_eds_backend;
#line 52 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp3_ = eds_test_backend_get_address_book_uid (_tmp2_);
#line 52 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp4_ = _tmp3_;
#line 52 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp5_ = g_strdup_printf ("eds:%s", _tmp4_);
#line 52 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	config_val = _tmp5_;
#line 53 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_setenv ("FOLKS_PRIMARY_STORE", config_val, TRUE);
#line 46 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_free0 (config_val);
#line 253 "remove-persona.c"
}


static void remove_persona_tests_real_tear_down (FolksTestCase* base) {
	RemovePersonaTests * self;
	EdsTestBackend* _tmp0_;
#line 56 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self = (RemovePersonaTests*) base;
#line 58 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp0_ = self->priv->_eds_backend;
#line 58 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	eds_test_backend_tear_down (_tmp0_);
#line 266 "remove-persona.c"
}


static gboolean __lambda2_ (RemovePersonaTests* self) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_;
#line 73 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp0_ = self->priv->_main_loop;
#line 73 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_main_loop_quit (_tmp0_);
#line 74 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_assert_not_reached ();
#line 71 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return result;
#line 281 "remove-persona.c"
}


static gboolean ___lambda2__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda2_ (self);
#line 71 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return result;
#line 290 "remove-persona.c"
}


void remove_persona_tests_test_remove_persona (RemovePersonaTests* self) {
	GMainLoop* _tmp0_;
	gchar* _tmp1_;
	GMainLoop* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
#line 61 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_return_if_fail (self != NULL);
#line 63 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 63 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 63 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self->priv->_main_loop = _tmp0_;
#line 64 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp1_ = g_strdup ("persona #1");
#line 64 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_free0 (self->priv->_persona_fullname);
#line 64 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self->priv->_persona_fullname = _tmp1_;
#line 66 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self->priv->_persona_removed = FALSE;
#line 67 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self->priv->_individual_removed = FALSE;
#line 69 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_remove_persona_tests_test_remove_persona_async (self, NULL, NULL);
#line 71 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda2__gsource_func, g_object_ref (self), g_object_unref);
#line 77 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp2_ = self->priv->_main_loop;
#line 77 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_main_loop_run (_tmp2_);
#line 79 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp3_ = self->priv->_persona_removed;
#line 79 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_vala_assert (_tmp3_ == TRUE, "this._persona_removed == true");
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp4_ = self->priv->_individual_removed;
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_vala_assert (_tmp4_ == TRUE, "this._individual_removed == true");
#line 334 "remove-persona.c"
}


static void _remove_persona_tests_test_remove_persona_async_data_free (gpointer _data) {
	RemovePersonaTestsTestRemovePersonaAsyncData* _data_;
	_data_ = _data;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (_data_->self);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_slice_free (RemovePersonaTestsTestRemovePersonaAsyncData, _data_);
#line 345 "remove-persona.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return self ? g_object_ref (self) : NULL;
#line 352 "remove-persona.c"
}


static void _remove_persona_tests_test_remove_persona_async (RemovePersonaTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RemovePersonaTestsTestRemovePersonaAsyncData* _data_;
	RemovePersonaTests* _tmp0_;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_ = g_slice_new0 (RemovePersonaTestsTestRemovePersonaAsyncData);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _remove_persona_tests_test_remove_persona_async);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _remove_persona_tests_test_remove_persona_async_data_free);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->self = _tmp0_;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_remove_persona_tests_test_remove_persona_async_co (_data_);
#line 371 "remove-persona.c"
}


static void _remove_persona_tests_test_remove_persona_finish (RemovePersonaTests* self, GAsyncResult* _res_) {
	RemovePersonaTestsTestRemovePersonaAsyncData* _data_;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 379 "remove-persona.c"
}


static void _remove_persona_tests_test_remove_persona_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RemovePersonaTestsTestRemovePersonaAsyncData* _data_;
#line 86 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_ = _user_data_;
#line 86 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_source_object_ = source_object;
#line 86 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_res_ = _res_;
#line 86 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_remove_persona_tests_test_remove_persona_async_co (_data_);
#line 393 "remove-persona.c"
}


static void __remove_persona_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 88 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_remove_persona_tests_individuals_changed_cb (self, changes);
#line 400 "remove-persona.c"
}


static void __remove_persona_tests_notify_pstore_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 105 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_remove_persona_tests_notify_pstore_cb (self, _sender, pspec);
#line 407 "remove-persona.c"
}


static gboolean _remove_persona_tests_test_remove_persona_async_co (RemovePersonaTestsTestRemovePersonaAsyncData* _data_) {
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	switch (_data_->_state_) {
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		case 0:
#line 416 "remove-persona.c"
		goto _state_0;
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		case 1:
#line 420 "remove-persona.c"
		goto _state_1;
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		case 2:
#line 424 "remove-persona.c"
		goto _state_2;
		default:
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_assert_not_reached ();
#line 429 "remove-persona.c"
	}
	_state_0:
#line 85 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp0_ = NULL;
#line 85 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp0_ = folks_backend_store_dup ();
#line 85 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->store = _data_->_tmp0_;
#line 86 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_state_ = 1;
#line 86 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	folks_backend_store_prepare (_data_->store, _remove_persona_tests_test_remove_persona_async_ready, _data_);
#line 86 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return FALSE;
#line 444 "remove-persona.c"
	_state_1:
#line 86 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 87 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp1_ = folks_individual_aggregator_new ();
#line 87 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 87 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->self->priv->_aggregator = _data_->_tmp1_;
#line 88 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp2_ = _data_->self->priv->_aggregator;
#line 88 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_signal_connect_object (_data_->_tmp2_, "individuals-changed-detailed", (GCallback) __remove_persona_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 458 "remove-persona.c"
	{
#line 92 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 92 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_state_ = 2;
#line 92 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		folks_individual_aggregator_prepare (_data_->_tmp3_, _remove_persona_tests_test_remove_persona_async_ready, _data_);
#line 92 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		return FALSE;
#line 468 "remove-persona.c"
		_state_2:
#line 92 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
#line 92 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		if (_data_->_inner_error_ != NULL) {
#line 474 "remove-persona.c"
			goto __catch0_g_error;
		}
#line 94 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_g_object_unref0 (_data_->self->priv->_pstore);
#line 94 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->self->priv->_pstore = NULL;
#line 481 "remove-persona.c"
		{
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_data_->_tmp4_ = folks_backend_store_get_enabled_backends (_data_->store);
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_data_->_tmp5_ = _data_->_tmp4_;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_data_->_tmp6_ = gee_map_get_values (_data_->_tmp5_);
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_data_->_tmp7_ = _data_->_tmp6_;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_data_->_tmp8_ = _data_->_tmp7_;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_data_->_tmp9_ = NULL;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_data_->_tmp9_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp8_);
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_data_->_tmp10_ = _data_->_tmp9_;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_g_object_unref0 (_data_->_tmp8_);
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_data_->_backend_it = _data_->_tmp10_;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			while (TRUE) {
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp11_ = _data_->_backend_it;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp12_ = FALSE;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp12_ = gee_iterator_next (_data_->_tmp11_);
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				if (!_data_->_tmp12_) {
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					break;
#line 515 "remove-persona.c"
				}
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp13_ = _data_->_backend_it;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp14_ = NULL;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp14_ = gee_iterator_get (_data_->_tmp13_);
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->backend = (FolksBackend*) _data_->_tmp14_;
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp15_ = _data_->backend;
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp16_ = folks_backend_get_persona_stores (_data_->_tmp15_);
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp17_ = _data_->_tmp16_;
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp18_ = _data_->self->priv->_eds_backend;
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp19_ = eds_test_backend_get_address_book_uid (_data_->_tmp18_);
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp20_ = _data_->_tmp19_;
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp21_ = NULL;
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp21_ = gee_map_get (_data_->_tmp17_, _data_->_tmp20_);
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_g_object_unref0 (_data_->self->priv->_pstore);
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->self->priv->_pstore = (FolksPersonaStore*) G_TYPE_CHECK_INSTANCE_CAST ((FolksPersonaStore*) _data_->_tmp21_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore);
#line 100 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_data_->_tmp22_ = _data_->self->priv->_pstore;
#line 100 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				if (_data_->_tmp22_ != NULL) {
#line 101 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_g_object_unref0 (_data_->backend);
#line 101 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					break;
#line 553 "remove-persona.c"
				}
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_g_object_unref0 (_data_->backend);
#line 557 "remove-persona.c"
			}
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_g_object_unref0 (_data_->_backend_it);
#line 561 "remove-persona.c"
		}
#line 103 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp23_ = _data_->self->priv->_pstore;
#line 103 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_vala_assert (_data_->_tmp23_ != NULL, "this._pstore != null");
#line 105 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp24_ = _data_->self->priv->_pstore;
#line 105 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_signal_connect_object ((GObject*) _data_->_tmp24_, "notify::is-prepared", (GCallback) __remove_persona_tests_notify_pstore_cb_g_object_notify, _data_->self, 0);
#line 106 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_remove_persona_tests_try_to_add (_data_->self);
#line 573 "remove-persona.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 90 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->e = _data_->_inner_error_;
#line 90 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_inner_error_ = NULL;
#line 110 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp25_ = _data_->e;
#line 110 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp26_ = _data_->_tmp25_->message;
#line 110 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_warning ("remove-persona.vala:110: Error when calling prepare: %s\n", _data_->_tmp26_);
#line 90 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_g_error_free0 (_data_->e);
#line 590 "remove-persona.c"
	}
	__finally0:
#line 90 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	if (_data_->_inner_error_ != NULL) {
#line 90 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_g_object_unref0 (_data_->store);
#line 90 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 90 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_clear_error (&_data_->_inner_error_);
#line 90 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		return FALSE;
#line 603 "remove-persona.c"
	}
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (_data_->store);
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	if (_data_->_state_ == 0) {
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 611 "remove-persona.c"
	} else {
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 615 "remove-persona.c"
	}
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_object_unref (_data_->_async_result);
#line 83 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return FALSE;
#line 621 "remove-persona.c"
}


static void _remove_persona_tests_notify_pstore_cb (RemovePersonaTests* self, GObject* _pstore, GParamSpec* ps) {
#line 114 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_return_if_fail (self != NULL);
#line 114 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_return_if_fail (_pstore != NULL);
#line 114 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_return_if_fail (ps != NULL);
#line 116 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_remove_persona_tests_try_to_add (self);
#line 634 "remove-persona.c"
}


static void _remove_persona_tests_try_to_add (RemovePersonaTests* self) {
	gboolean _tmp0_ = FALSE;
	FolksPersonaStore* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp5_;
#line 119 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_return_if_fail (self != NULL);
#line 121 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp1_ = self->priv->_pstore;
#line 121 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp2_ = folks_persona_store_get_is_prepared (_tmp1_);
#line 121 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp3_ = _tmp2_;
#line 121 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	if (_tmp3_) {
#line 654 "remove-persona.c"
		gboolean _tmp4_;
#line 122 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_tmp4_ = self->priv->_added_persona;
#line 122 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_tmp0_ = _tmp4_ == FALSE;
#line 660 "remove-persona.c"
	} else {
#line 121 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_tmp0_ = FALSE;
#line 664 "remove-persona.c"
	}
#line 121 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp5_ = _tmp0_;
#line 121 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	if (_tmp5_) {
#line 124 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		self->priv->_added_persona = TRUE;
#line 125 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_remove_persona_tests_add_persona (self, NULL, NULL);
#line 674 "remove-persona.c"
	}
}


static void _remove_persona_tests_add_persona_data_free (gpointer _data) {
	RemovePersonaTestsAddPersonaData* _data_;
	_data_ = _data;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (_data_->self);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_slice_free (RemovePersonaTestsAddPersonaData, _data_);
#line 686 "remove-persona.c"
}


static void _remove_persona_tests_add_persona (RemovePersonaTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RemovePersonaTestsAddPersonaData* _data_;
	RemovePersonaTests* _tmp0_;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_ = g_slice_new0 (RemovePersonaTestsAddPersonaData);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _remove_persona_tests_add_persona);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _remove_persona_tests_add_persona_data_free);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->self = _tmp0_;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_remove_persona_tests_add_persona_co (_data_);
#line 705 "remove-persona.c"
}


static void _remove_persona_tests_add_persona_finish (RemovePersonaTests* self, GAsyncResult* _res_) {
	RemovePersonaTestsAddPersonaData* _data_;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 713 "remove-persona.c"
}


static void _g_free0_ (gpointer var) {
#line 131 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	var = (g_free (var), NULL);
#line 720 "remove-persona.c"
}


static void _vala_GValue_free (GValue* self) {
#line 131 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_value_unset (self);
#line 131 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_free (self);
#line 729 "remove-persona.c"
}


static void __vala_GValue_free0_ (gpointer var) {
#line 131 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	(var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL));
#line 736 "remove-persona.c"
}


static GValue* _g_value_dup (GValue* self) {
#line 133 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return g_boxed_copy (G_TYPE_VALUE, self);
#line 743 "remove-persona.c"
}


static gpointer __g_value_dup0 (gpointer self) {
#line 133 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return self ? _g_value_dup (self) : NULL;
#line 750 "remove-persona.c"
}


static void _remove_persona_tests_add_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RemovePersonaTestsAddPersonaData* _data_;
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_ = _user_data_;
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_source_object_ = source_object;
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_res_ = _res_;
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_remove_persona_tests_add_persona_co (_data_);
#line 764 "remove-persona.c"
}


static gboolean _remove_persona_tests_add_persona_co (RemovePersonaTestsAddPersonaData* _data_) {
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	switch (_data_->_state_) {
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		case 0:
#line 773 "remove-persona.c"
		goto _state_0;
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		case 1:
#line 777 "remove-persona.c"
		goto _state_1;
		default:
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_assert_not_reached ();
#line 782 "remove-persona.c"
	}
	_state_0:
#line 131 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp0_ = g_str_hash;
#line 131 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp1_ = g_str_equal;
#line 131 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, __vala_GValue_free0_);
#line 131 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->details = _data_->_tmp2_;
#line 133 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	memset (&_data_->_tmp3_, 0, sizeof (GValue));
#line 133 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_value_init (&_data_->_tmp3_, G_TYPE_STRING);
#line 133 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 133 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp5_ = __g_value_dup0 (&_data_->_tmp4_);
#line 133 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp6_ = _data_->_tmp5_;
#line 133 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	G_IS_VALUE (&_data_->_tmp4_) ? (g_value_unset (&_data_->_tmp4_), NULL) : NULL;
#line 133 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->v1 = _data_->_tmp6_;
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp7_ = _data_->v1;
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp8_ = _data_->self->priv->_persona_fullname;
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_value_set_string (_data_->_tmp7_, _data_->_tmp8_);
#line 135 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp9_ = NULL;
#line 135 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp9_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_FULL_NAME);
#line 135 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp10_ = g_strdup (_data_->_tmp9_);
#line 135 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->_tmp11_ = _data_->v1;
#line 135 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_data_->v1 = NULL;
#line 135 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_hash_table_insert (_data_->details, _data_->_tmp10_, _data_->_tmp11_);
#line 825 "remove-persona.c"
	{
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp12_ = _data_->self->priv->_aggregator;
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp13_ = _data_->self->priv->_pstore;
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_state_ = 1;
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp12_, NULL, _data_->_tmp13_, _data_->details, _remove_persona_tests_add_persona_ready, _data_);
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		return FALSE;
#line 837 "remove-persona.c"
		_state_1:
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp14_ = NULL;
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp14_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp12_, _data_->_res_, &_data_->_inner_error_);
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp15_ = _data_->_tmp14_;
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_g_object_unref0 (_data_->_tmp15_);
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		if (_data_->_inner_error_ != NULL) {
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
#line 851 "remove-persona.c"
				goto __catch1_folks_individual_aggregator_error;
			}
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			__vala_GValue_free0 (_data_->v1);
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_g_hash_table_unref0 (_data_->details);
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			g_clear_error (&_data_->_inner_error_);
#line 140 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			return FALSE;
#line 864 "remove-persona.c"
		}
	}
	goto __finally1;
	__catch1_folks_individual_aggregator_error:
	{
#line 138 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->e = _data_->_inner_error_;
#line 138 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_inner_error_ = NULL;
#line 145 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp16_ = _data_->e;
#line 145 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_data_->_tmp17_ = _data_->_tmp16_->message;
#line 145 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_warning ("remove-persona.vala:145: [RemovePersonaError] add_persona_from_details" \
": %s\n", _data_->_tmp17_);
#line 138 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_g_error_free0 (_data_->e);
#line 882 "remove-persona.c"
	}
	__finally1:
#line 138 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	if (_data_->_inner_error_ != NULL) {
#line 138 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		__vala_GValue_free0 (_data_->v1);
#line 138 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_g_hash_table_unref0 (_data_->details);
#line 138 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 138 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_clear_error (&_data_->_inner_error_);
#line 138 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		return FALSE;
#line 897 "remove-persona.c"
	}
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	__vala_GValue_free0 (_data_->v1);
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_hash_table_unref0 (_data_->details);
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	if (_data_->_state_ == 0) {
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 907 "remove-persona.c"
	} else {
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 911 "remove-persona.c"
	}
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_object_unref (_data_->_async_result);
#line 129 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return FALSE;
#line 917 "remove-persona.c"
}


static void __remove_persona_tests_personas_cb_folks_persona_store_personas_changed (FolksPersonaStore* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self) {
#line 177 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_remove_persona_tests_personas_cb (self);
#line 924 "remove-persona.c"
}


static void _remove_persona_tests_individuals_changed_cb (RemovePersonaTests* self, GeeMultiMap* changes) {
	GeeMultiMap* _tmp0_;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* added;
	GeeMultiMap* _tmp2_;
	GeeSet* _tmp3_ = NULL;
	GeeSet* removed;
#line 150 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_return_if_fail (self != NULL);
#line 150 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_return_if_fail (changes != NULL);
#line 153 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp0_ = changes;
#line 153 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 153 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	added = _tmp1_;
#line 154 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp2_ = changes;
#line 154 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 154 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	removed = _tmp3_;
#line 951 "remove-persona.c"
	{
		GeeCollection* _tmp4_;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _i_it;
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_tmp4_ = added;
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_i_it = _tmp5_;
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		while (TRUE) {
#line 964 "remove-persona.c"
			GeeIterator* _tmp6_;
			gboolean _tmp7_ = FALSE;
			GeeIterator* _tmp8_;
			gpointer _tmp9_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp10_;
			FolksIndividual* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp6_ = _i_it;
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			if (!_tmp7_) {
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				break;
#line 983 "remove-persona.c"
			}
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp8_ = _i_it;
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			i = (FolksIndividual*) _tmp9_;
#line 158 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp10_ = i;
#line 158 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			if (_tmp10_ == NULL) {
#line 160 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_g_object_unref0 (i);
#line 160 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				continue;
#line 999 "remove-persona.c"
			}
#line 163 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp11_ = i;
#line 163 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp12_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp11_);
#line 163 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp13_ = _tmp12_;
#line 163 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp14_ = self->priv->_persona_fullname;
#line 163 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			if (g_strcmp0 (_tmp13_, _tmp14_) == 0) {
#line 1011 "remove-persona.c"
				FolksIndividual* _tmp15_;
				const gchar* _tmp16_;
				const gchar* _tmp17_;
				gchar* _tmp18_;
				FolksIndividual* _tmp31_;
				FolksIndividual* _tmp32_;
				FolksPersonaStore* _tmp33_;
				GeeMap* _tmp34_;
				GeeMap* _tmp35_;
				const gchar* _tmp36_;
				gboolean _tmp37_ = FALSE;
#line 165 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp15_ = i;
#line 165 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp16_ = folks_individual_get_id (_tmp15_);
#line 165 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp17_ = _tmp16_;
#line 165 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp18_ = g_strdup (_tmp17_);
#line 165 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_g_free0 (self->priv->_individual_id);
#line 165 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				self->priv->_individual_id = _tmp18_;
#line 1035 "remove-persona.c"
				{
					FolksIndividual* _tmp19_;
					GeeSet* _tmp20_;
					GeeSet* _tmp21_;
					GeeIterator* _tmp22_ = NULL;
					GeeIterator* _p_it;
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_tmp19_ = i;
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_tmp20_ = folks_individual_get_personas (_tmp19_);
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_tmp21_ = _tmp20_;
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_tmp22_ = gee_iterable_iterator ((GeeIterable*) _tmp21_);
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_p_it = _tmp22_;
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					while (TRUE) {
#line 1054 "remove-persona.c"
						GeeIterator* _tmp23_;
						gboolean _tmp24_ = FALSE;
						GeeIterator* _tmp25_;
						gpointer _tmp26_ = NULL;
						FolksPersona* p;
						FolksPersona* _tmp27_;
						const gchar* _tmp28_;
						const gchar* _tmp29_;
						gchar* _tmp30_;
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_tmp23_ = _p_it;
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_tmp24_ = gee_iterator_next (_tmp23_);
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						if (!_tmp24_) {
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
							break;
#line 1072 "remove-persona.c"
						}
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_tmp25_ = _p_it;
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_tmp26_ = gee_iterator_get (_tmp25_);
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						p = (FolksPersona*) _tmp26_;
#line 170 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_tmp27_ = p;
#line 170 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_tmp28_ = folks_persona_get_iid (_tmp27_);
#line 170 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_tmp29_ = _tmp28_;
#line 170 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_tmp30_ = g_strdup (_tmp29_);
#line 170 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_g_free0 (self->priv->_persona_id);
#line 170 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						self->priv->_persona_id = _tmp30_;
#line 171 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						_g_object_unref0 (p);
#line 171 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
						break;
#line 1096 "remove-persona.c"
					}
#line 168 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_g_object_unref0 (_p_it);
#line 1100 "remove-persona.c"
				}
#line 174 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp31_ = i;
#line 174 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp32_ = _g_object_ref0 (_tmp31_);
#line 174 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_g_object_unref0 (self->priv->_individual);
#line 174 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				self->priv->_individual = _tmp32_;
#line 175 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp33_ = self->priv->_pstore;
#line 175 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp34_ = folks_persona_store_get_personas (_tmp33_);
#line 175 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp35_ = _tmp34_;
#line 175 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp36_ = self->priv->_persona_id;
#line 175 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_tmp37_ = gee_map_has_key (_tmp35_, _tmp36_);
#line 175 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				if (_tmp37_ == TRUE) {
#line 1122 "remove-persona.c"
					FolksPersonaStore* _tmp38_;
					FolksIndividualAggregator* _tmp39_;
					FolksIndividual* _tmp40_;
#line 177 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_tmp38_ = self->priv->_pstore;
#line 177 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					g_signal_connect_object (_tmp38_, "personas-changed", (GCallback) __remove_persona_tests_personas_cb_folks_persona_store_personas_changed, self, 0);
#line 178 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_tmp39_ = self->priv->_aggregator;
#line 178 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					_tmp40_ = self->priv->_individual;
#line 178 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
					folks_individual_aggregator_remove_individual (_tmp39_, _tmp40_, NULL, NULL);
#line 1136 "remove-persona.c"
				}
			}
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_g_object_unref0 (i);
#line 1141 "remove-persona.c"
		}
#line 156 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_g_object_unref0 (_i_it);
#line 1145 "remove-persona.c"
	}
	{
		GeeSet* _tmp41_;
		GeeIterator* _tmp42_ = NULL;
		GeeIterator* _i_it;
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_tmp41_ = removed;
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_tmp42_ = gee_iterable_iterator ((GeeIterable*) _tmp41_);
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_i_it = _tmp42_;
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		while (TRUE) {
#line 1159 "remove-persona.c"
			GeeIterator* _tmp43_;
			gboolean _tmp44_ = FALSE;
			GeeIterator* _tmp45_;
			gpointer _tmp46_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp47_;
			FolksIndividual* _tmp48_;
			const gchar* _tmp49_;
			const gchar* _tmp50_;
			const gchar* _tmp51_;
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp43_ = _i_it;
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp44_ = gee_iterator_next (_tmp43_);
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			if (!_tmp44_) {
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				break;
#line 1178 "remove-persona.c"
			}
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp45_ = _i_it;
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp46_ = gee_iterator_get (_tmp45_);
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			i = (FolksIndividual*) _tmp46_;
#line 185 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp47_ = i;
#line 185 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			if (_tmp47_ == NULL) {
#line 187 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				_g_object_unref0 (i);
#line 187 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				continue;
#line 1194 "remove-persona.c"
			}
#line 190 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp48_ = i;
#line 190 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp49_ = folks_individual_get_id (_tmp48_);
#line 190 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp50_ = _tmp49_;
#line 190 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_tmp51_ = self->priv->_individual_id;
#line 190 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			if (g_strcmp0 (_tmp50_, _tmp51_) == 0) {
#line 192 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
				self->priv->_individual_removed = TRUE;
#line 1208 "remove-persona.c"
			}
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
			_g_object_unref0 (i);
#line 1212 "remove-persona.c"
		}
#line 183 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_g_object_unref0 (_i_it);
#line 1216 "remove-persona.c"
	}
#line 150 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (removed);
#line 150 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (added);
#line 1222 "remove-persona.c"
}


static void _remove_persona_tests_personas_cb (RemovePersonaTests* self) {
	FolksPersonaStore* _tmp0_;
	GeeMap* _tmp1_;
	GeeMap* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
#line 197 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_return_if_fail (self != NULL);
#line 199 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp0_ = self->priv->_pstore;
#line 199 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp1_ = folks_persona_store_get_personas (_tmp0_);
#line 199 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp2_ = _tmp1_;
#line 199 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp3_ = self->priv->_persona_id;
#line 199 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp4_ = gee_map_has_key (_tmp2_, _tmp3_);
#line 199 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	if (_tmp4_ == FALSE) {
#line 1246 "remove-persona.c"
		GMainLoop* _tmp5_;
#line 201 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		self->priv->_persona_removed = TRUE;
#line 202 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		_tmp5_ = self->priv->_main_loop;
#line 202 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
		g_main_loop_quit (_tmp5_);
#line 1254 "remove-persona.c"
	}
}


static void remove_persona_tests_class_init (RemovePersonaTestsClass * klass) {
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	remove_persona_tests_parent_class = g_type_class_peek_parent (klass);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_type_class_add_private (klass, sizeof (RemovePersonaTestsPrivate));
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = remove_persona_tests_real_set_up;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = remove_persona_tests_real_tear_down;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	G_OBJECT_CLASS (klass)->finalize = remove_persona_tests_finalize;
#line 1270 "remove-persona.c"
}


static void remove_persona_tests_instance_init (RemovePersonaTests * self) {
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self->priv = REMOVE_PERSONA_TESTS_GET_PRIVATE (self);
#line 36 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self->priv->_added_persona = FALSE;
#line 1279 "remove-persona.c"
}


static void remove_persona_tests_finalize (GObject* obj) {
	RemovePersonaTests * self;
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_REMOVE_PERSONA_TESTS, RemovePersonaTests);
#line 26 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 27 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 28 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 29 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_free0 (self->priv->_persona_fullname);
#line 32 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_free0 (self->priv->_individual_id);
#line 33 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (self->priv->_pstore);
#line 34 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_free0 (self->priv->_persona_id);
#line 35 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (self->priv->_individual);
#line 24 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	G_OBJECT_CLASS (remove_persona_tests_parent_class)->finalize (obj);
#line 1305 "remove-persona.c"
}


GType remove_persona_tests_get_type (void) {
	static volatile gsize remove_persona_tests_type_id__volatile = 0;
	if (g_once_init_enter (&remove_persona_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RemovePersonaTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) remove_persona_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RemovePersonaTests), 0, (GInstanceInitFunc) remove_persona_tests_instance_init, NULL };
		GType remove_persona_tests_type_id;
		remove_persona_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "RemovePersonaTests", &g_define_type_info, 0);
		g_once_init_leave (&remove_persona_tests_type_id__volatile, remove_persona_tests_type_id);
	}
	return remove_persona_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	RemovePersonaTests* _tmp1_;
	RemovePersonaTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 209 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_test_init (&args_length1, &args, NULL);
#line 211 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp0_ = g_test_get_root ();
#line 211 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	root = _tmp0_;
#line 212 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp1_ = remove_persona_tests_new ();
#line 212 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp2_ = _tmp1_;
#line 212 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 212 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 212 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	_g_object_unref0 (_tmp2_);
#line 214 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_test_run ();
#line 216 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	result = 0;
#line 216 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return result;
#line 1350 "remove-persona.c"
}


int main (int argc, char ** argv) {
#line 207 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	g_type_init ();
#line 207 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/eds/remove-persona.vala"
	return _vala_main (argv, argc);
#line 1359 "remove-persona.c"
}



