Namespace Serenity.UnityGlobal.Tests.Infrastructure
Classes
AddressablesAssetLocatorTests
Tests for AddressablesAssetLocator. Covers the ResourcesOnly short-circuit path, which returns false without invoking the Addressables API (no catalog needed).
AudioMixerDependencyCacheTests
Tests for AudioMixerDependencyCache lookup methods. The cache is static and shared, so these tests only assert the cache-miss contract (lookups for names that were never cached return null) which holds regardless of whether Initialize has run elsewhere in the session.
LogSettingsTests
Tests for UnityLogProfile, UnityConsoleLogSettings, UnityFileLogSettings, UnityLogSettings.
LoggingInfrastructureTests
Tests for logging infrastructure classes.
SerenityAssetLoadingModeProviderTests
Tests for the static SerenityAssetLoadingModeProvider and its instance adapter UnitySerenityAssetLoadingModeProvider. Each test resets the static provider in TearDown because it holds session-wide state.
UnityAddressableUtilsResourcesOnlyTests
Tests for UnityAddressableUtils in ResourcesOnly mode, where every entry point short-circuits to an empty list without touching the Addressables API (so no scene/catalog is required).
UnityAssetUtilsAddressablesThreadingTests
Guards the main-thread threading contract documented on UnityAssetUtils.
Addressables mutates unsynchronized internal state (m_resultToHandle and the global
operation-callback node cache) from the completion callbacks that
WaitForCompletion pumps on the calling thread. Before the fix, Serenity's async
helpers awaited with ConfigureAwait(false) and released handles from the resulting
thread-pool continuation, so a blocking load overlapping an async one corrupted that state
and Addressables logged (and swallowed) an IndexOutOfRangeException or
NullReferenceException from inside its own callback dispatch.
The test drives only production entry points — LoadAllFromAnyAsync<T>(IEnumerable<string>, CancellationToken)
running concurrently with LoadAllFromAnyBlocking<T>(IEnumerable<string>)
on the main thread — so it is the production code, not the test, that decides which thread
each Addressables call lands on. Reintroducing ConfigureAwait(false) on any of those
awaits fails this test within a few rounds.
UnityAssetUtilsEdgeCaseTests
Tests for UnityAssetUtils edge cases that early-return without touching Addressables/Resources: null/empty inputs, cache clearing, and warning bookkeeping. These do not require an Addressables catalog or scene fixtures. Full asset-loading paths are intentionally out of scope here.
UnityAudioMixerGroupUtilsTests
Tests for UnityAudioMixerGroupUtils. Covers the null / wrong-type / true-null branches that don't require a real AudioMixer asset (which would need AssetDatabase).
UnityDefinitionBaseTests
Tests for the abstract ScriptableObject definition base classes UnityViewDefinition and UnityTaskDefinition via minimal concrete subclasses.
UnityEventDispatcherServiceTests
Tests for UnityEventDispatcherService (concrete impl).
UnityFileLogServiceLogFileNameTests
Tests for UnityFileLogService log file name configuration.
UnityGameSettingsDefinitionTests
Tests for UnityGameSettingsDefinition ScriptableObject.
UnityGameSettingsServicePersistenceTests
Tests for UnityGameSettingsService persistence path configuration.
UnityGlobalServiceTests
Tests for the UnityGlobalService MonoBehaviour properties and event-dispatcher wiring. Scene lifecycle paths (RestartApplication / Input System cleanup) need a full scene + Input System setup and are out of scope.
UnityHierarchyUtilsSceneTests
Tests for the scene-scoped helpers of UnityHierarchyUtils (GetSceneRoots / FindInSceneWithTag / FindInScene). Scene-wide queries are made deterministic by isolating objects in a freshly created scene and querying it through the Scene-parameter overloads; the active-scene overloads are covered with Contains-style assertions that tolerate unrelated objects already present in the editor scene.
UnityHierarchyUtilsTests
Tests for UnityHierarchyUtils. Uses real GameObject hierarchies and the always-present "Untagged" tag, avoiding scene-wide Find queries that depend on other objects.
UnityInstanceActivatorTests
Tests for UnityInstanceActivator.
UnityMainThreadDispatcherTests
Tests for UnityMainThreadDispatcher.
UnityMainThreadTests
Tests for UnityMainThread — requires Play mode.
UnityObjectUtilsTests
Tests for UnityObjectUtils: the destroyed-object-aware IsAlive check and the
GetOrAddComponent get-or-add helper shared across services/channels.
UnityParserUtilsTests
Tests for UnityParserUtils.
UnityReflectionCallTaskTests
Tests for UnityReflectionCallTask construction and base-class wiring. Execution paths (which dispatch to the main thread / resolve types) are covered indirectly elsewhere; here we assert the constructor builds a valid ReflectionCallTask with the supplied identity/criticality.
UnityResourceUtilsTests
Tests for UnityResourceUtils.
UnityServiceHostTests
Tests for UnityServiceHost: the "new GameObject, name it, add the hosting component" factory boilerplate shared by the Unity service factories.
UnitySettingsTests
Tests for UnityTaskDefinition, UnityActionDefinition, UnityReflectionCallTaskDefinition.
UnityUiUtilsTests
Tests for UnityUiUtils RectTransform helpers.
UnityUserSystemUtilsTests
Tests for UnityUserSystemUtils platform predicates. Asserts the predicates are internally consistent with the actual runtime platform rather than hardcoding a single OS, so the tests pass on any test runner (Windows editor, CI, etc.).
UnityViewBaseTests
Tests for UnityViewBase lifecycle methods.
UnityYamlUtilsTests
Tests for UnityYamlUtils (pure string + YAML parsing helpers).