Class TestingExtensions
A set of extension methods to be used in unit-testing scenarios. Should not be used in production.
Namespace: Realms.Sync.Testing
Assembly: Realm.dll
Syntax
public static class TestingExtensions
Methods
| Improve this Doc View SourceSimulateError(Session, ErrorCode, string, bool)
Simulates a session error.
Declaration
public static void SimulateError(this Session session, ErrorCode errorCode, string message, bool isFatal = false)
Parameters
Type | Name | Description |
---|---|---|
Session | session | The session where the simulated error will occur. |
ErrorCode | errorCode | Error code. |
string | message | Error message. |
bool | isFatal | If set to |
Remarks
Use this method to test your error handling code without connecting to Atlas Device Sync. Some error codes, such as OtherSessionError will be ignored and will not be reported to the OnSessionError callback.