Package arez

Class ArezTestUtil

java.lang.Object
arez.ArezTestUtil

@GwtIncompatible public final class ArezTestUtil extends Object
Utility class for interacting with Arez config settings in tests.
  • Method Details

    • resetConfig

      public static void resetConfig(boolean productionMode)
      Reset the state of Arez config to either production or development state.
      Parameters:
      productionMode - true to set it to production mode configuration, false to set it to development mode config.
    • setLogger

      public static void setLogger(@Nullable ArezTestUtil.Logger logger)
      Specify logger to use to capture logging in tests
      Parameters:
      logger - the logger.
    • enableNames

      public static void enableNames()
      Set the `arez.enable_names` setting to true.
    • disableNames

      public static void disableNames()
      Set the `arez.enable_names` setting to false.
    • enableReferences

      public static void enableReferences()
      Set the `arez.enable_references` setting to true.
    • disableReferences

      public static void disableReferences()
      Set the `arez.enable_references` setting to false.
    • enableVerify

      public static void enableVerify()
      Set the `arez.enable_verify` setting to true.
    • disableVerify

      public static void disableVerify()
      Set the `arez.enable_verify` setting to false.
    • enablePropertyIntrospectors

      public static void enablePropertyIntrospectors()
      Set the `arez.enable_property_introspection` setting to true.
    • disablePropertyIntrospectors

      public static void disablePropertyIntrospectors()
      Set the `arez.enable_property_introspection` setting to false.
    • purgeTasksWhenRunawayDetected

      public static void purgeTasksWhenRunawayDetected()
      Set the `arez.purge_tasks_when_runaway_detected` setting to true.
    • noPurgeTasksWhenRunawayDetected

      public static void noPurgeTasksWhenRunawayDetected()
      Set the `arez.purge_tasks_when_runaway_detected` setting to false.
    • enforceTransactionType

      public static void enforceTransactionType()
      Set the `arez.enforce_transaction_type` setting to true.
    • noEnforceTransactionType

      public static void noEnforceTransactionType()
      Set the `arez.enforce_transaction_type` setting to false.
    • enableSpies

      public static void enableSpies()
      Set the `arez.enable_spies` setting to true.
    • disableSpies

      public static void disableSpies()
      Set the `arez.enable_spies` setting to false.
    • enableZones

      public static void enableZones()
      Set the `arez.enable_zones` setting to true. This will result in the Arez state being reset to align with this setting. The normal practice is to invoke this at the start of a test.
    • disableZones

      public static void disableZones()
      Set the `arez.enable_zones` setting to false. This will result in the Arez state being reset to align with this setting. The normal practice is to invoke this at the start of a test.
    • makeCollectionPropertiesModifiable

      public static void makeCollectionPropertiesModifiable()
      Set the `arez.collections_properties_unmodifiable` setting to true.
    • makeCollectionPropertiesUnmodifiable

      Set the `arez.collections_properties_unmodifiable` setting to false.
    • enableNativeComponents

      public static void enableNativeComponents()
      Set the `arez.enable_native_components` setting to true. This will result in the Arez state being reset to align with this setting. The normal practice is to invoke this at the start of a test.
    • disableNativeComponents

      public static void disableNativeComponents()
      Set the `arez.enable_native_components` setting to false. This will result in the Arez state being reset to align with this setting. The normal practice is to invoke this at the start of a test.
    • enableRegistries

      public static void enableRegistries()
      Set the `arez.enable_registries` setting to true. This will result in the Arez state being reset to align with this setting. The normal practice is to invoke this at the start of a test.
    • disableRegistries

      public static void disableRegistries()
      Set the `arez.enable_registries` setting to false. This will result in the Arez state being reset to align with this setting. The normal practice is to invoke this at the start of a test.
    • enableTaskInterceptor

      public static void enableTaskInterceptor()
      Set the `arez.enable_task_interceptor` setting to true.
    • disableTaskInterceptor

      public static void disableTaskInterceptor()
      Set the `arez.enable_task_interceptor` setting to false.
    • enableObserverErrorHandlers

      public static void enableObserverErrorHandlers()
      Set the `arez.enable_observer_error_handlers` setting to true.
    • disableObserverErrorHandlers

      public static void disableObserverErrorHandlers()
      Set the `arez.enable_observer_error_handlers` setting to false.
    • checkInvariants

      public static void checkInvariants()
      Set the `arez.check_invariants` setting to true.
    • noCheckInvariants

      public static void noCheckInvariants()
      Set the `arez.check_invariants` setting to false.
    • checkApiInvariants

      public static void checkApiInvariants()
      Set the `arez.check_api_invariants` setting to true.
    • noCheckApiInvariants

      public static void noCheckApiInvariants()
      Set the `arez.check_api_invariants` setting to false.