setMockInstance static method

  1. @visibleForTesting
void setMockInstance(
  1. MobileRag? mock
)

(FOR TESTING ONLY) Inject a custom instance for mocking.

This allows you to provide a mock implementation or a pre-configured engine instance in unit tests.

Implementation

@visibleForTesting
static void setMockInstance(MobileRag? mock) {
  _instance = mock;
  if (mock != null && mock.engine != _engine) {
    _engine = mock.engine;
  }
}