tests: Add ringer tests

We mock libfeedback and CallsCall to test the ringer for the following
scenarios:
- Call state changes
- User requested silencing of ringer
- Multiple calls
This commit is contained in:
Evangelos Ribeiro Tzaras
2021-10-22 07:23:29 +02:00
parent f86162da03
commit 7dadb3c50f
7 changed files with 878 additions and 0 deletions

28
tests/mock-libfeedback.h Normal file
View File

@@ -0,0 +1,28 @@
#pragma once
#define LIBFEEDBACK_USE_UNSTABLE_API
#include <libfeedback.h>
#include <glib.h>
gboolean __wrap_lfb_init (const char *app_id,
GError **error);
void __wrap_lfb_uninit (void);
void __wrap_lfb_event_set_feedback_profile (LfbEvent *self,
const char *profile);
void __wrap_lfb_event_trigger_feedback_async (LfbEvent *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean __wrap_lfb_event_trigger_feedback_finish (LfbEvent *self,
GAsyncResult *res,
GError **error);
void __wrap_lfb_event_end_feedback_async (LfbEvent *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean __wrap_lfb_event_end_feedback_finish (LfbEvent *self,
GAsyncResult *res,
GError **error);