Mocking a Realm App and User for testing on Swift


I am trying to add an XCTest to verify that I can retrieve content from a mock realm after logging the user into the realm app. This is so that I can create an app instance; log in to it to get the user; use that user to provide config to the realm instance

I have protocols wrapped around accessing the app and user but can’t find a solution to get the test implementations to return a hand-rolled User

Any advice or pointers would be massively appreciated