Namespace Serenity.UnitySoundMixer.Tests.Editor
Classes
AudioChannelCreatorTests
EditMode tests for AudioChannelCreator: id/folder validation rules (pure) and, in a
temporary folder, actual channel-settings asset creation including the resolve-or-create-in-place
contract AudioChannelCreator now delegates to
Serenity.AudioPlayer.Infrastructure.Settings.Editor.Builder.AudioPlayerSettingsCreator for.
The AudioMixerGroup is passed as null (allowed) because a real AudioMixerGroup cannot be constructed
in EditMode. Every Create(string, string, AudioPlayerType, uint, AudioMixerGroup, bool) call passes
registerAsAddressables: false so these tests never write to the project's Addressables settings.
AudioMixerEffectLoopCreatorCreateTests
EditMode tests for Create(CreateAudioMixerEffectLoopInput) against a real, working
AudioMixer — a temporary copy of the project's own Media/SoundMixer/AudioMixers/AudioMixer.mixer,
so the reflection adapter's internal-API calls run against a genuine AudioMixerController
instead of one hand-constructed in memory, which — per AudioMixerEffectLoopSyncServiceTests
and AudioChannelCreatorTests — cannot be done in EditMode. A failure INSIDE that internal
API (e.g. mid-loop, after the group already exists) is likewise not reproducible without a live
editor session, so these cover what IS deterministic here: a full successful run, the unique-name
resolution path, the pre-mutation validation guard leaving the mixer untouched, and that this
creator — unlike LeaderboardCreator/GameSaveCreator — registers nothing with
Addressables, since it only edits an AudioMixer asset that is already registered.
AudioMixerEffectLoopCreatorValidateTests
Pure EditMode tests for Validate(CreateAudioMixerEffectLoopInput). The mixer/parent-group rules require live AudioMixer assets (covered behind those branches), so these focus on the rules that are reachable without a real mixer: name, effect-list and null-input validation.
AudioMixerEffectLoopSyncServiceTests
EditMode tests for the early-return guards of SyncDefinition(UnitySoundMixerEffectLoopDefinition). The full sync path needs a live AudioMixer asset (covered behind the AudioMixer != null branch), so these assert the fail-fast diagnostics that fire before any mixer access: null definition, no AudioMixer assigned, and a missing loop-group name. FindEligibleSourceGroupNames(AudioMixer, string, string) returns empty for a null mixer.
AudioMixerYamlReaderTests
Pure EditMode tests for AudioMixerYamlReader. They feed a hand-built, structurally
faithful Unity-AudioMixer YAML document (object stream with anchors and {fileID} references)
straight into the reader, so no real .mixer asset or open Editor is required.
EffectLoopDtoTests
EditMode tests for the effect-loop editor DTOs: the plain data carriers and the Ok/Fail factory methods on the output records (including the null-warnings -> empty-list normalisation that the UI relies on).
SoundMixerEffectLoopActionScriptGeneratorTests
EditMode tests for GenerateForGroups(string, string, IEnumerable<string>, string, ICollection<string>): input guards, invalid-folder guard, and idempotent created-vs-skipped accounting when generating the Enable/Disable action-script pair into a temporary folder.
SoundMixerEffectLoopBinderTests
EditMode tests for SoundMixerEffectLoopBinder. The settings-resolution and add paths
depend on the set of UnitySoundMixerSettings assets present in the project (and a live mixer
reference), so these focus on the deterministic null guard and the report-factory contract.
UnitySoundMixerEffectLoopDefinitionFactoryTests
Pure EditMode tests for Validate(CreateSoundMixerEffectLoopDefinitionInput) and the
loop-id regex. The success path of Create requires a live AudioMixer (the factory rejects a
null mixer first), so it is not exercised here; the validation rules below cover every reachable
failure message and gate the UI's Create button.