logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.UnityGlobal.Tests.Editor

    Classes

    EditorPlaybackClockTests

    EditMode tests for Serenity.Global.Infrastructure.Editor.Preview.EditorPlaybackClock.AdvanceTime(System.Single,System.Single,System.Single,System.Boolean,System.Boolean@) — pure step math, no editor-tick wiring.

    EditorTypePickerFiltersTests

    Direct unit tests for Serenity.Global.Infrastructure.Editor.EditorTypePickerFilters's test-assembly-name rule — the shared filter every editor type picker (signal types, interface-implementer object fields, ...) applies so a designer never sees an NUnit test fixture in an authoring dropdown. Covers every naming shape actually present in this project's asmdefs (verified by find Assets -iname "*.asmdef" | grep -i test).

    FoundationEditorTests

    Tests for FoundationEditor. Editor-only.

    FoundationIdReferenceGuiTests

    Tests for the pure resolution logic in Serenity.Global.Infrastructure.Editor.FoundationIdReferenceGui. Editor-only; Serenity.Global.Infrastructure.Editor.FoundationIdReferenceGui.LoadCandidates(System.Type) is not covered here since it depends on a real UnityEditor.AssetDatabase scan.

    GameSettingsValueFieldDrawerTests

    Tests for GameSettingsValueFieldDrawer's parsing/formatting helpers. Editor-only.

    ModelPreviewCameraFramingTests

    EditMode tests for Serenity.Global.Infrastructure.Editor.Preview.ModelPreviewCameraFraming — pure math, no scene objects.

    ModelPreviewContentTests

    EditMode tests for Serenity.Global.Infrastructure.Editor.Preview.ModelPreviewContent. Every fixture is a runtime-built UnityEngine.GameObject (no assets touched), destroyed in TearDown().

    PreviewOrbitStateTests

    EditMode tests for Serenity.Global.Infrastructure.Editor.Preview.PreviewOrbitState — pure math, no scene objects.

    SerenityAssetCreationTransactionTests

    EditMode tests for Serenity.Global.Infrastructure.Editor.SerenityAssetCreationTransaction. Follows the temp-folder hygiene convention of UnityEditorUtilsTests: every fixture asset lives under a private temp folder that is wiped in TearDown(), and any Addressables entry a test registers is removed explicitly (in a finally or in TearDown()) per the project rule that tests must not pollute the real Addressables settings.

    SerenityAssetIdLookupTestSettings

    A throwaway IFoundationSettings asset type used by SerenityAssetIdLookupTests to exercise the by-Id passes against real assets on disk. Lives in its own same-named file so Unity can bind its script when the tests create it as an asset (mirrors UnityEditorUtilsTestFoundationSettings).

    Deliberately NOT shared with any other suite: the project-wide pass queries by type name, so a type used from two suites would make whole-project assertions depend on the other suite's cleanup.

    SerenityAssetIdLookupTests

    Tests for the two by-Id passes behind every creation engine's duplicate and near-miss reporting. Editor-only, and deliberately built on real assets on disk: the contract is about what UnityEditor.AssetDatabase queries return, which no in-memory double can stand in for.

    SerenityAssetIdRulesTestSettings

    A throwaway IFoundationSettings asset type used by SerenityAssetIdRulesTests to build real Serenity.Global.Infrastructure.Editor.SerenityAssetIdLookup.IdMatches`1 pairs to feed the rules. Lives in its own same-named file so Unity can bind its script when the tests create it as an asset (mirrors SerenityAssetIdLookupTestSettings).

    Deliberately its OWN type rather than a reuse of SerenityAssetIdLookupTestSettings, for the reason that type's doc gives: the by-Id passes query by type name, so a type shared across two suites makes one suite's whole-project assertions depend on the other suite's cleanup.

    SerenityAssetIdRulesTests

    Tests for Serenity.Global.Infrastructure.Editor.SerenityAssetIdRules. Like SerenityAssetIdLookupTests these build real assets on disk, because the only way to obtain a Serenity.Global.Infrastructure.Editor.SerenityAssetIdLookup.IdMatches`1 is to run a real pass over them — the struct's constructor is internal precisely so a rule can never be fed a pair no lookup produced.

    Every pass here is folder-scoped. None asks for the whole project, so this suite cannot be perturbed by what the real project ships.

    SerenityCreationValidationResultTests

    Tests for Serenity.Global.Infrastructure.Editor.SerenityCreationValidationResult. Unlike its neighbours in this folder it touches no assets on disk: the type is a pure in-memory accumulator, so every case here is a direct assertion about what a validation pass reported and in what order.

    The cases that matter most are the two the inversion onto AuthoringIssue could have changed silently — report order within a severity, and whether a flat view still reflects a finding added after something already read it.

    SerenityEditorTextFieldCommitTests

    Tests for Serenity.Global.Infrastructure.Editor.SerenityEditorTextFieldCommit's pending/flush lifecycle, driven entirely through its internal test seams — no real AssetDatabase or Undo traffic, and the real EditorApplication.update tick is never touched (its subscribe/unsubscribe seams are stubbed out for the duration of each test). Editor-only.

    SerenityWebGLResourcesPathsTests

    Tests for the pure path/validation logic of Serenity.Global.Infrastructure.Editor.Utils.WebGL.SerenityWebGLResourcesPaths and the JSON-shape helpers of Serenity.Global.Infrastructure.Editor.Utils.WebGL.SerenityWebGLExportManifest. Covers normalization, Resources-folder detection, asset-path-to-load-key conversion and the structured destination validation rules. Nothing here touches the filesystem or AssetDatabase. Editor-only.

    SerenityWizardActivityLogTests

    Tests for Serenity.Global.Infrastructure.Editor.SerenityWizardActivityLog — the shared rich-text status log that replaced every stepped wizard's hand-rolled string _status field and private LogSuccess/LogWarning/LogError/Append methods. Pins the exact markup those wizards built by hand (<color=#RRGGBB>{icon} {message}</color>, tinted from Serenity.Global.Infrastructure.Editor.SerenityWizardGui's own palette) so a future palette or format change is caught here first. Editor-only.

    SerenityWizardStepControllerTests

    Tests for Serenity.Global.Infrastructure.Editor.SerenityWizardStepController — the shared int-cursor step machine that replaced every stepped wizard's hand-rolled SetStep/GoNext/GoBack/CanGoBack. Covers navigation bounds and the scroll-reset/focus-clear side effect every wizard's old SetStep reproduced by hand. Editor-only.

    UnityAnimationAssetUtilsTests

    EditMode tests for Serenity.Global.Infrastructure.Editor.UnityAnimationAssetUtils. Every fixture (clip, controller, prefab) is built under a private temp folder and torn down after each test, mirroring ModelAnimationScannerTests. Includes a regression guard pinning the exact keyframe literals ThemeAnimationGenerator.SpecFor(ShowHideAnimation.ScalePop) fed into the overshoot curve builder as they stood immediately before this type was extracted out of ThemeAnimationGenerator.

    UnityAssemblyScannerTests

    Tests for the docs-build assembly scanner helpers that do not require a fabricated Unity Assembly: Serenity.Global.Infrastructure.Editor.Utils.UnityAssemblyScanner.PrepareOutput(Serenity.Global.Infrastructure.Editor.Utils.UnityBuildJob,System.String@,System.String@,System.String@) (derives dll/xml/rsp paths from a Serenity.Global.Infrastructure.Editor.Utils.UnityBuildJob), the empty-sources guard of Serenity.Global.Infrastructure.Editor.Utils.UnityAssemblyScanner.WriteRsp(Serenity.Global.Infrastructure.Editor.Utils.UnityBuildJob,System.String,System.String,System.String,System.Boolean), and the editor-driven Serenity.Global.Infrastructure.Editor.Utils.UnityAssemblyScanner.GatherWork(System.Boolean,System.Boolean,System.String[]) which queries the live CompilationPipeline. The full WriteRsp success path needs a real Unity Assembly (defines / allReferences) that cannot be constructed in a unit test, so only its precondition is asserted here. Editor-only.

    UnityDirectoryClonerTests

    Regression tests for UnityDirectoryCloner foundation settings behavior. Validates that cloning regenerates IFoundationSettings.Guid without creating dynamic Addressables labels from that Guid.

    UnityDocfxApiTocGeneratorTests

    Tests for the DocFX API table-of-contents pipeline: Serenity.Global.Infrastructure.Editor.Utils.TocNode (data model), Serenity.Global.Infrastructure.Editor.Utils.UnityDocfxTypeIndexBuilder, Serenity.Global.Infrastructure.Editor.Utils.UnityDocfxNamespaceIndexWriter and the orchestrating Serenity.Global.Infrastructure.Editor.Utils.UnityDocfxApiTocGenerator. These build TOC/index structures from generated *.yml files and emit toc.yml + per-namespace index.md. All file I/O is routed through a per-test temp directory cleaned up in TearDown(). Editor-only.

    UnityDocfxWritersTests

    Tests for the path-parameterized DocFX file-writing helpers that accept an explicit docsDir and therefore can be exercised against a temp directory without touching the real project: Serenity.Global.Infrastructure.Editor.Utils.UnityDocfxScaffoldWriter, Serenity.Global.Infrastructure.Editor.Utils.UnityDocfxTemplateWriter and Serenity.Global.Infrastructure.Editor.Utils.UnityDocfxCacheCleaner.CleanApiFolder(System.String). The members that resolve their destination from Serenity.Global.Infrastructure.Editor.Utils.UnityDocsPaths (e.g. CleanAllCaches, UnityDocfxConfigurationWriter.Generate, UnityDocfxBrandingWriter.EnsureMinimalBrandFiles) would write into the live project docs folder and are intentionally not invoked here. Editor-only.

    UnityDocsBrandingTests

    Tests for Serenity.Global.Infrastructure.Editor.Utils.UnityDocsBranding and the DocFX writers' branding-parameterized paths. Every writer exercised here is either a pure function with no file IO (Serenity.Global.Infrastructure.Editor.Utils.UnityDocfxConfigurationWriter.BuildDocfxJson(Serenity.Global.Infrastructure.Editor.Utils.UnityDocsBranding,System.Collections.Generic.IEnumerable{System.String}), Serenity.Global.Infrastructure.Editor.Utils.UnityDocfxBrandingWriter.GenerateCss(Serenity.Global.Infrastructure.Editor.Utils.UnityDocsBranding)) or a path-parameterized overload that accepts an explicit docsDir (mirrors the temp-dir convention in UnityDocfxWritersTests) — nothing here writes into the live project's docs folder. Editor-only.

    UnityDocsPathsAndConstantsTests

    Tests for the computed paths in Serenity.Global.Infrastructure.Editor.Utils.UnityDocsPaths and the literal values in Serenity.Global.Infrastructure.Editor.Utils.UnityDocsConstants. These are read-only derivations from Application.dataPath; the tests assert the relationships between the paths rather than absolute machine-specific strings, so they stay culture- and machine-agnostic. Editor-only.

    UnityEditorUtilsTestFoundationSettings

    A throwaway IFoundationSettings asset type used by UnityEditorUtilsTests to exercise UnityEditorUtils.AssetUtils.TryFindAssetWithId/FindAllAssets against real assets on disk. Lives in its own same-named file so Unity can bind its script when the tests create it as an asset (mirrors CodecTestSO in the ProjectRecipe tests).

    UnityEditorUtilsTests

    Tests for UnityEditorUtils static utility classes. Editor-only.

    UnityProcessRunnerTests

    Tests for UnityProcessRunner. Editor-only.

    UnityTextMeasurementUtilsTests

    Tests for UnityTextMeasurementUtils. Editor-only.

    In this article
    © 2026 Serenity. All Rights Reserved