![]() |
![]() |
![]() |
![]() |
FolksDummyPersonaStore — A persona store which allows FolksDummyPersonas to be programmatically created and manipulated, for the purposes of testing the core of libfolks itself. This should not be used in user-visible applications.
There are two sides to this class’ interface: the methods and properties declared by FolksPersonaStore, which form the normal libfolks persona store API; and the mock methods and properties (see for example folks_dummy_persona_store_set_add_persona_from_details_mock()
) which are intended to be used by test driver code to simulate the behaviour of a real backing store. Calls to these mock methods effect state changes in the store which are visible in the normal libfolks API. The update_
, register_
and unregister_
prefixes and the mock
suffix are commonly used for backing store methods.
The main action performed with a dummy persona store is to change its set of personas, adding and removing them dynamically to test client-side behaviour. The client-side APIs (folks_persona_store_add_persona_from_details()
and folks_persona_store_remove_persona()
) should not be used for this. Instead, the mock APIs should be used: folks_dummy_persona_store_freeze_personas_changed()
, folks_dummy_persona_store_register_personas()
, folks_dummy_persona_store_unregister_personas()
and folks_dummy_persona_store_thaw_personas_changed()
. These can be used to build up complex "personas-changed" signal emissions, which are only emitted after the final call to folks_dummy_persona_store_thaw_personas_changed()
.
The API in FolksDummy is unstable and may change wildly. It is designed mostly for use by libfolks unit tests.