Namespace Serenity.ProjectRecipe.Tests.Editor
Classes
CodecFoundationSO
A throwaway ScriptableObject that carries Serenity's IFoundationSettings identity (named
Id/Guid like real definitions, so the codec skips them). Used by the generic-section
matchByOutputPath (Gap 6) test, which needs an asset whose Id can be preserved on update.
CodecTestBase
Polymorphic base for exercising [SerializeReference] (managed reference) handling.
CodecTestDerived
Concrete managed-reference type.
CodecTestNested
Nested serializable struct used to exercise the codec's generic/object handling.
CodecTestSO
A throwaway ScriptableObject with an assortment of field kinds, used by the generic codec tests. It lives in its own same-named file so Unity can bind its script when the tests create it as an asset.
CutsceneRecipeRoundTripTest
Round-trip tests for the typed cutscenes recipe section: import creates a definition with its
stages, export maps it back to a DTO, and an export → re-import recreates an equivalent asset. Temporary
folders are cleaned up after each test.
RecipeTestMarkerSignal
A parameterless marker signal (the common case for menu/option wiring), used by the Gap 4 signal tests.
Lives in the test assembly so it is resolvable by FullName through the domain assembly scan.
RecipeTestPayloadSignal
A signal carrying Unity-serialized data, used to prove the signal codec round-trips a signal's field graph
(not just its type). Fields are public so [SerializeReference] serializes them.
RecipeTestSupport
Shared helpers for recipe tests that reach Import with real assets, so they do not pollute the project's Addressables settings.
SerenityDiscoveryRegistryTests
Tests for BuildJson() — the machine-readable "what exists" dump an agent reads to author valid recipes. The registry DTOs are private, so these tests parse the JSON into local mirror types and assert on content discovered live from the project.
SerenityRecipeAddressablesRegistrationTests
Verifies the recipe importer's Addressables registration path: an Import
run with registerAsAddressables on retags every created/updated asset into the Serenity
Addressables group with its section's module label (and, for the audioClips section, the
referenced source clip before its load key is resolved); the opt-out leaves the project's
Addressables settings untouched. Temp folders and Addressables entries are cleaned up after each test.
SerenityRecipeExportTests
Tests for the recipe exporter, including a full export → re-import round trip. Menus are used because they need no external source asset. Temporary folders are cleaned up after each test.
SerenityRecipeFeedbackImportTests
Covers the feedbacks section end to end: FeedbackDefinition creation, the
generateTrigger companion UnityEventDispatcherSignalDefinition (both must be
recorded as outcomes — the fix that made FeedbackRecipeImporter report the trigger asset's
creation/update instead of only creating it silently), idempotent re-import, and Addressables
registration with the feedbacks section's module label. Temp folders and Addressables entries
are cleaned up after each test (see SerenityRecipeAddressablesRegistrationTests for the
same pattern applied to other sections).
SerenityRecipeGenericTests
Tests for the generic serialized-property codec and the generic assets section, including a full
export → re-import round trip and polymorphic [SerializeReference] handling. The test types live
in CodecTestSO.cs so Unity can bind their scripts when created as assets.
SerenityRecipeImportTests
Asset-database-backed tests for the importer. Menus are used because they have no external source dependency, so a recipe can create real assets without authoring AudioClips first. Each test cleans up the temporary output folder.
SerenityRecipeLocalizationTests
Tests for the localization recipe section. Validation cases run in Validate mode (no writes); the dry-run case asserts a would-create outcome is recorded without touching the project (real collection creation is verified live, to avoid mutating the project's locales). Also guards the engine's importer-discovery order.
SerenityRecipeReportTests
Tests for ToJson() — the machine-readable report an agent reads to self-correct. Verifies counts, flags, summary, and that enums round-trip as their string names rather than integers. The report's JSON DTOs are private, so these tests parse into local mirror types.
SerenityRecipeSignalTests
Tests for typed menu/modal signal wiring (recipe automation Gap 4): per-option submit signals and the
menu-level onShow/onHide/onCancel/onSubmit slots, including parameterless
markers, signals carrying serialized data, a full export → re-import round trip, and the unresolved-type
degradation. Temp folders are cleaned up after each test.
SerenityRecipeTemplateGeneratorTests
Tests for the Recipe Template Generator: it enumerates authorable types and produces recipe stubs whose JSON parses back through the loader, with the right section populated (typed vs generic).
SerenityRecipeValidationTests
Pure parsing/validation/path tests for the Serenity Project Recipe importer. These do not touch the asset database (validate-only runs and static path helpers).
Enums
CodecTestSO.E
Enum used by the codec enum tests.