Namespace Serenity.UnityProceduralAnimator.Tests.Infrastructure
Classes
ConditionTests
Tests for the inline Condition hierarchy: AlwaysTrue, Threshold (hysteresis), Range, And/Or/Not composites, plus validation messages. State is supplied via a FakeStateReader and UnityProceduralContext.
GraphicColorSequenceLayerSOTests
Tests for GraphicColorSequenceLayerSO: early-return guards, the cycles-gated
hold-last-step behavior it shares with TransformPositionSequenceLayerSO (no wrap-seam
unwrap — UnityEngine.Color.Lerp(UnityEngine.Color,UnityEngine.Color,System.Single) has no angular wraparound ambiguity, same as
UnityEngine.Vector3.Lerp(UnityEngine.Vector3,UnityEngine.Vector3,System.Single)), and — the deliberate difference from every transform-facet sequence layer —
that weight is written to the delta VERBATIM rather than pre-blended toward identity here (see
Weight's own remarks: the applier performs the weight-blend, since a Graphic's
base color is only known there). Drives the layer directly via its public 6-delta Evaluate
override with a crafted UnityProceduralContext — the same seam
TransformPositionSequenceLayerSOTests uses.
LayerAndActionSOTests
Tests for representative ProceduralLayerSO / ProceduralActionSO assets that are deterministic without the per-frame animator loop: PeriodicOscillationLayerSO (uses ctx.Time) and FlinchActionSO (driven directly via ActionRuntimeState).
ProceduralActionSchedulerTests
PlayMode tests for ProceduralActionScheduler: starting, cooldown gating, retrigger, per-frame ticking, retirement of finished actions, and stopping everything at once.
ProceduralAnimatorProfileSOIdentityTests
Tests for ProceduralAnimatorProfileSO's IFoundationSettings identity (Id/Guid), separate from its rule/layer/action composition tests.
ProceduralAnimatorTargetBinderTests
PlayMode tests for ProceduralAnimatorTargetBinder. Builds a real hierarchy with a real Renderer and Material, drives registration from a real ProceduralAnimatorProfileSO, and asserts what reached the appliers plus what was reported as skipped.
ProceduralBoneExclusionSetTests
PlayMode tests for ProceduralBoneExclusionSet: which bone offsets survive a strip, and that replacing the set is not additive.
ProceduralLayerDrivenChannelsTests
Tests for DrivenChannels: a table-driven assertion for every concrete
layer type in the codebase today, plus a reflection-based consistency check that a type's declared
channels always match which base-class Evaluate overload it actually overrides — the contract
DrivenChannels's own doc comment states in prose.
ProceduralLayerWeightSchedulerTests
PlayMode tests for ProceduralLayerWeightScheduler: seeding from a resolved configuration, the first-tick snap, blend-in and blend-out ramps driven by a rule, the lazily stamped ON_ACTIVATE layer clock, and auto-deactivation once a repeat window elapses.
RuleSOTests
Tests for RuleSO: default condition behavior, condition evaluation, weight mapping via an injected WeightProvider, and the RuleEffect enum.
SettingsRefTests
Tests for the serializable ID reference structs (BoneIdRef, MaterialIdRef, TransformIdRef) and BoneBinding: conversions to domain IDs, validity, equality, implicit operators.
StateBusComponentTests
PlayMode tests for StateBusComponent (MonoBehaviour implementing IStateReader). Smoothing is left disabled (default) so Set/Get is synchronous and deterministic.
TargetMappingTests
Tests for UnityTransformTargetMapping and UnityMaterialTargetMapping: path-based resolution against real Transform hierarchies, validity, defaults, ToString.
TransformPositionSequenceLayerSOTests
Tests for TransformPositionSequenceLayerSO: early-return guards, effective-weight blending
toward identity (Vector3.zero, see Weight's sibling convention on
TransformPositionData.Weight), and the cycles-gated hold-last-step behavior it shares with
TransformScaleSequenceLayerSO (no wrap-seam unwrap — unlike
TransformRotationSequenceLayerSO, UnityEngine.Vector3.Lerp(UnityEngine.Vector3,UnityEngine.Vector3,System.Single) has no angular wraparound
ambiguity). Drives the layer directly via its public 3-delta Evaluate override with a crafted
UnityProceduralContext — the same seam TransformRotationSequenceLayerSOTests uses.
TransformRigApplierTests
PlayMode tests for TransformRigApplier. Drives real Unity Transforms via a runtime UnityRigDefinition and asserts the resulting localPosition / localRotation after applying engine-agnostic PoseDeltas.
TransformRotationSequenceLayerSOTests
Tests for TransformRotationSequenceLayerSO: early-return guards, effective-weight blending
toward identity (0 degrees, see Weight's sibling convention on
Weight), and the loop-seam "always increasing" wrap rule that lets a
baked sequence read as one continuous spin instead of snapping backward at the wrap (see
ResolveStepAngle's own remarks). Drives the layer directly via its public 3-delta
Evaluate override with a crafted UnityProceduralContext — the same seam
LayerAndActionSOTests/RuleSOTests use for their own deterministic layer coverage — rather
than through reflection or an assembly-internal seam, since this assembly carries no
InternalsVisibleTo friend for the ProceduralAnimator infrastructure assembly.
TransformScaleSequenceLayerSOTests
Tests for TransformScaleSequenceLayerSO's wrap-seam/clamped-end handling — mirrors
TransformRotationSequenceLayerSOTests's coverage of the analogous rotation quirk:
ResolveStepScale must not blend a non-looping last step into step 0's scale once time clamps at
the end, the same "no next playthrough to blend into" rule ResolveStepAngle documents.
UnityActivationApplierTests
PlayMode tests for UnityActivationApplier. Registers real GameObjects and asserts activeSelf after applying ActivationDeltas.
UnityGraphicColorApplierTests
PlayMode tests for UnityGraphicColorApplier.
Registers real GameObjects carrying UGUI UnityEngine.UI.Image components and asserts their live
UnityEngine.UI.Graphic.color after applying UiColorDeltas — mirrors
UnityTransformApplierTests's self-correcting-applier coverage shape, adapted for this applier's
per-target collection-of-slots model instead of one component per target.
UnityMaterialApplierTests
PlayMode tests for UnityMaterialApplier. Validates target registration bookkeeping and that Apply against a real Renderer with a real Material does not throw and respects guard clauses.
UnityProceduralContextTests
Tests for UnityProceduralContext: state access by UnityStateKey/StateKeyId, null-safety, and conversion to the domain ProceduralContext.
UnityRigDefinitionTests
PlayMode tests for UnityRigDefinition (MonoBehaviour). Builds a rig on a real GameObject and validates bone lookup by string and domain BoneId.
UnityShaderColorPropertyResolverTests
PlayMode tests for UnityShaderColorPropertyResolver. Uses real Materials to validate color-property resolution and caching.
UnityStateKeyTests
Tests for UnityStateKey ScriptableObject: clamp/normalize math, range hints, and conversion to the domain StateKeyId.
UnityTransformApplierTests
PlayMode tests for UnityTransformApplier. Registers real Transforms and asserts localScale after applying TransformDeltas (scale is applied as a multiplier against the cached original scale).
WeightProviderTests
Tests for the WeightProviderSO implementations: ConstantWeightProviderSO (fixed value) and StateKeyWeightProviderSO (state read + curve mapping).