mockAll method

ZenTestMode mockAll(
  1. Map<Type, dynamic> mocks
)

Mock multiple dependencies at once

Example:

Zen.testMode().mockAll({
  AuthService: FakeAuthService(),
  ApiClient: MockApiClient(),
  CacheService: InMemoryCacheService(),
});

Implementation

ZenTestMode mockAll(Map<Type, dynamic> mocks) {
  for (final entry in mocks.entries) {
    ZenLogger.logDebug('🧪 Test Mode: Mocking ${entry.key}');

    // This requires runtime type inspection - simplified version
    final instance = entry.value;
    Zen.put(instance);
  }

  return this;
}