2018-06-13 13:38:51 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Purism SPC
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-3.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "setup-origin.h"
|
|
|
|
#include "calls-provider.h"
|
|
|
|
|
|
|
|
void
|
|
|
|
test_dummy_origin_set_up (OriginFixture *fixture,
|
|
|
|
gconstpointer user_data)
|
|
|
|
{
|
2021-02-15 05:34:34 +00:00
|
|
|
GListModel *origins;
|
2018-06-13 13:38:51 +00:00
|
|
|
|
|
|
|
test_dummy_provider_set_up (&fixture->parent, user_data);
|
|
|
|
|
2022-01-14 08:09:13 +00:00
|
|
|
/* provider adds an origin with name "Dummy origin" by itself... */
|
2018-06-13 13:38:51 +00:00
|
|
|
calls_dummy_provider_add_origin (fixture->parent.dummy_provider,
|
|
|
|
TEST_ORIGIN_NAME);
|
|
|
|
|
|
|
|
origins = calls_provider_get_origins
|
|
|
|
(CALLS_PROVIDER (fixture->parent.dummy_provider));
|
2022-01-14 08:09:13 +00:00
|
|
|
fixture->dummy_origin = g_list_model_get_item (origins, 1);
|
2018-06-13 13:38:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
test_dummy_origin_tear_down (OriginFixture *fixture,
|
|
|
|
gconstpointer user_data)
|
|
|
|
{
|
2022-01-14 08:09:13 +00:00
|
|
|
g_clear_object (&fixture->dummy_origin);
|
2018-06-13 13:38:51 +00:00
|
|
|
test_dummy_provider_tear_down (&fixture->parent, user_data);
|
|
|
|
}
|