resetInstanceForTesting method

  1. @visibleForTesting
void resetInstanceForTesting()

Reset instance for testing (without closing boxes)

Implementation

@visibleForTesting
void resetInstanceForTesting() {
  _isInitialized = false;
  _eventsBox = null;
  _internalStateBox = null;
  _performanceBox = null;
  _prefs = null;
  _useHive = true;
  // Close and recreate stream controller
  if (!_storageEventsController.isClosed) {
    _storageEventsController.close();
  }
  _storageEventsController = StreamController<StorageEvent>.broadcast();
  ObslyLogger.debug('Storage instance reset for testing');
}