Package arez
Class ArezTestUtil
java.lang.Object
arez.ArezTestUtil
Utility class for interacting with Arez config settings in tests.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface to intercept log messages emitted by Arez runtime. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Set the `arez.check_api_invariants` setting to true.static void
Set the `arez.check_invariants` setting to true.static void
Set the `arez.enable_names` setting to false.static void
Set the `arez.enable_native_components` setting to false.static void
Set the `arez.enable_observer_error_handlers` setting to false.static void
Set the `arez.enable_property_introspection` setting to false.static void
Set the `arez.enable_references` setting to false.static void
Set the `arez.enable_registries` setting to false.static void
Set the `arez.enable_spies` setting to false.static void
Set the `arez.enable_task_interceptor` setting to false.static void
Set the `arez.enable_verify` setting to false.static void
Set the `arez.enable_zones` setting to false.static void
Set the `arez.enable_names` setting to true.static void
Set the `arez.enable_native_components` setting to true.static void
Set the `arez.enable_observer_error_handlers` setting to true.static void
Set the `arez.enable_property_introspection` setting to true.static void
Set the `arez.enable_references` setting to true.static void
Set the `arez.enable_registries` setting to true.static void
Set the `arez.enable_spies` setting to true.static void
Set the `arez.enable_task_interceptor` setting to true.static void
Set the `arez.enable_verify` setting to true.static void
Set the `arez.enable_zones` setting to true.static void
Set the `arez.enforce_transaction_type` setting to true.static void
Set the `arez.collections_properties_unmodifiable` setting to true.static void
Set the `arez.collections_properties_unmodifiable` setting to false.static void
Set the `arez.check_api_invariants` setting to false.static void
Set the `arez.check_invariants` setting to false.static void
Set the `arez.enforce_transaction_type` setting to false.static void
Set the `arez.purge_tasks_when_runaway_detected` setting to false.static void
Set the `arez.purge_tasks_when_runaway_detected` setting to true.static void
resetConfig
(boolean productionMode) Reset the state of Arez config to either production or development state.static void
setLogger
(ArezTestUtil.Logger logger) Specify logger to use to capture logging in tests
-
Method Details
-
resetConfig
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
Specify logger to use to capture logging in tests- Parameters:
logger
- the logger.
-
enableNames
Set the `arez.enable_names` setting to true. -
disableNames
Set the `arez.enable_names` setting to false. -
enableReferences
Set the `arez.enable_references` setting to true. -
disableReferences
Set the `arez.enable_references` setting to false. -
enableVerify
Set the `arez.enable_verify` setting to true. -
disableVerify
Set the `arez.enable_verify` setting to false. -
enablePropertyIntrospectors
Set the `arez.enable_property_introspection` setting to true. -
disablePropertyIntrospectors
Set the `arez.enable_property_introspection` setting to false. -
purgeTasksWhenRunawayDetected
Set the `arez.purge_tasks_when_runaway_detected` setting to true. -
noPurgeTasksWhenRunawayDetected
Set the `arez.purge_tasks_when_runaway_detected` setting to false. -
enforceTransactionType
Set the `arez.enforce_transaction_type` setting to true. -
noEnforceTransactionType
Set the `arez.enforce_transaction_type` setting to false. -
enableSpies
Set the `arez.enable_spies` setting to true. -
disableSpies
Set the `arez.enable_spies` setting to false. -
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
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
Set the `arez.collections_properties_unmodifiable` setting to true. -
makeCollectionPropertiesUnmodifiable
Set the `arez.collections_properties_unmodifiable` setting to false. -
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
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
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
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
Set the `arez.enable_task_interceptor` setting to true. -
disableTaskInterceptor
Set the `arez.enable_task_interceptor` setting to false. -
enableObserverErrorHandlers
Set the `arez.enable_observer_error_handlers` setting to true. -
disableObserverErrorHandlers
Set the `arez.enable_observer_error_handlers` setting to false. -
checkInvariants
Set the `arez.check_invariants` setting to true. -
noCheckInvariants
Set the `arez.check_invariants` setting to false. -
checkApiInvariants
Set the `arez.check_api_invariants` setting to true. -
noCheckApiInvariants
Set the `arez.check_api_invariants` setting to false.
-