Audio contracts and script API tests
Section titled “Audio contracts and script API tests”Inno.Audio.Tests checks managed audio contracts and the real script API surface. It does not initialize an output device. Read audio playback before interpreting host and script contracts as equivalent.
Behavior covered
Section titled “Behavior covered”| Source | Representative assertions |
|---|---|
AudioContractTests |
The facade forwards through its execution context; scopes enforce last-in-first-out disposal; mixer construction produces a parent-before-child graph with a master bus and rejects cycles or missing parents; metadata round-trips. |
AudioValueValidationTests |
Playback, live and spatial parameters reject nonfinite scalar/vector components and undefined modes while accepting finite boundaries. |
AudioContentContractTests |
Combined capacity rejects an entire contribution, including earlier snapshots; zero capacity permits only empty content; default snapshots invalidate the contribution; emitter/listener identities share one admission namespace. |
AudioScriptingApiTests |
The facade, mixer provider and Scene components compile through the actual logical script namespace. |
The last group requires real compiler and projection inputs. Replacing them with CLR references would stop testing the promised script surface. Native playback belongs to the MiniAudio adapter suite.
Run and maintain
Section titled “Run and maintain”Use the shared validation workflow. For a focused diagnostic:
dotnet test tests/audio/Inno.Audio.Tests/Inno.Audio.Tests.csproj --configuration Debug --disable-build-servers -m:1 -nodeReuse:falsePreserve scope disposal, full-contribution rejection and real script compilation when extending the tests. Test methods are xUnit infrastructure rather than product APIs.