reset static method

void reset()

Reset all test state.

This is automatically called in tearDown when autoReset is true. Clears:

  • Current authenticated user
  • Time mocks
  • API mocks
  • In-memory cache
  • Backpack state
  • Locale changes

Implementation

static void reset() {
  _currentUser = null;
  NyTime.reset();
  NyMockApi.clear();
  NyTestCache.resetInstance();
  NyMockChannels.reset();
  Backpack.instance.deleteAll();
  _testState.clear();

  // Reset locale if it was changed
  if (_originalLocale != null) {
    // Locale reset handled by framework
    _originalLocale = null;
  }
}