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, Boolean)
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. |
Boolean | isFatal | If set to |
Remarks
Use this method to test your error handling code without connecting to a Realm Object Server. Some error codes, such as OtherSessionError will be ignored and will not be reported to Error subscribers.