Class AnimationHubClipEditorRegistryTests
EditMode tests for AnimationHubClipEditorRegistry. Every fixture is built under a private
temp folder and torn down after each test, mirroring ModelClipCreatorTests. The fallback path
deliberately mutates the Editor's selection and opens Unity's Animation window — those side effects are
acceptable to run in EditMode, so assertions stay on the returned
AnimationHubClipEditorRegistry.Result, never on UnityEditor.Selection state; the original
selection is restored in TearDown() regardless.
Inherited Members
Namespace: Serenity.AnimationHub.Tests.Editor
Assembly: Tests.Editor.dll
Syntax
public class AnimationHubClipEditorRegistryTests
Constructors
AnimationHubClipEditorRegistryTests()
Declaration
public AnimationHubClipEditorRegistryTests()
Methods
OpenEditor_NoClipNoModel_ReturnsNotFound()
Declaration
public void OpenEditor_NoClipNoModel_ReturnsNotFound()
OpenEditor_NoRegisteredEditor_ModelResolves_ReturnsAnimationWindowWithModel()
Declaration
public void OpenEditor_NoRegisteredEditor_ModelResolves_ReturnsAnimationWindowWithModel()
Remarks
Opening the Animation window against a MODEL builds a preview view, which a headless CI runner cannot do: Unity logs "No graphic device is available to initialize the view." and the test framework fails the test on the unhandled error. The assertion below is still meaningful without a display — the registry resolved the model and picked the right result — so the incidental log is tolerated rather than the test skipped, and only where it can actually occur. The clip-only sibling test needs none of this, because without a model no preview view is built.
OpenEditor_NoRegisteredEditor_NoModel_ReturnsAnimationWindowClipOnly()
Declaration
public void OpenEditor_NoRegisteredEditor_NoModel_ReturnsAnimationWindowClipOnly()
OpenEditor_RegisteredEditorCanEditFalse_FallsThroughToAnimationWindow()
Declaration
public void OpenEditor_RegisteredEditorCanEditFalse_FallsThroughToAnimationWindow()
OpenEditor_RegisteredEditorCanEditTrue_ReceivesOpenAndReturnsRegisteredEditor()
Declaration
public void OpenEditor_RegisteredEditorCanEditTrue_ReceivesOpenAndReturnsRegisteredEditor()
Register_Null_IsNoOp()
Declaration
public void Register_Null_IsNoOp()
SetUp()
Declaration
public void SetUp()
TearDown()
Declaration
public void TearDown()
Unregister_RestoresFallback()
Declaration
public void Unregister_RestoresFallback()