prepare_mock


Description:

public weak PrepareMock? prepare_mock { set; get; }

Mock function for Folks.PersonaStore.prepare.

This function is called whenever this store's Folks.PersonaStore.prepare method is called on an unprepared store. It allows the caller to determine whether preparing the store should fail, by throwing an error from this mock function. If no error is thrown from this function, preparing the store will succeed (and all future calls to Folks.PersonaStore.prepare will return immediately without calling this mock function). This is useful for testing error handling of calls to Folks.PersonaStore.prepare.

See FolksDummy.PersonaStore.add_persona_from_details_mock.

This mock function may be changed at any time; changes will take effect for the next call to Folks.PersonaStore.prepare.

Since:

0.9.7