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.
CodecRecipeIgnoredNested
Nested block with one field a recipe carries and one it never does.
CodecRecipeIgnoredTestSO
A throwaway ScriptableObject that exercises the recipe opt-out at the top level, inside a nested block, inside a list element and inside a managed reference, beside an unsupported field that is NOT opted out. It lives in its own same-named file so Unity can bind its script when the tests create it as an asset.
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.
CutsceneRecipeDialogFieldsTests
The cutscenes recipe section carries a stage's speaker, line and Translate flag: a recipe without the
keys imports them empty, the importer writes what a recipe holds, and the exporter always writes all three.
CutsceneRecipeDialogStageTests
A recipe's dialog stage with nothing to show, or too short to read, is a warning in the report — the player copes with both, so the importer never refuses it and the cutscene is still written.
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.
CutsceneRecipeUnplayedStageTests
A recipe agrees with the cutscene player about which stage types play: the importer refuses a cutscene carrying a stage the player would skip, with the same description the Cutscene Wizard shows, and the exporter never writes such a stage into a recipe the importer would then refuse.
RecipeSerializedPropertyCodecRecipeIgnoredTests
A field marked RecipeIgnoredAttribute is skipped silently by the codec on capture and on apply, wherever it sits (top level, nested block, list element, managed reference), while an unsupported field without the attribute still warns.
RecipeShippedAssetFixture
A private project folder filled with copies of real shipped Serenity assets — menus whose options carry
action and GameSettings bindings, modals whose options carry submit signals, a feedback with an animation
curve, an audio player routed to a mixer group, a clip and a music track. A round trip over hand-made
minimal assets proves nothing about the content a real project exports, so the recipe round-trip tests
run over these copies and compare the files on disk byte for byte — every copy and its .meta — and the
project files outside the copies a run could plausibly write (the Addressables settings and groups, the
shipped localization tables), which must stay byte-identical too. The shipped "Global" String Table
Collection is copied under a name of its own (see RecipeStringTableCollectionCopy).
RecipeShippedViews
Every view Serenity ships whose options a recipe exports and re-imports — each menu (composite-view menus included) and each modal under the package's media root — with its options, so a test can hold the shipped content itself to the identity contract a recipe relies on.
RecipeStringTableCollectionCopy
Copies the shipped "Global" String Table Collection — the collection, its shared data and its per-locale tables — into a fixture folder under a name of its own, with every reference between those files pointed at the copies. UnityEditor.AssetDatabase.CopyAsset(System.String,System.String) cannot do this: a copied collection keeps referencing the shipped tables, and a second collection named "Global" would make every lookup by name ambiguous. The Localization package registers an imported collection's tables as Addressables; the copy removes those entries again, so a test never leaves the project's Addressables settings changed or a locale registered.
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.
RecipeUnsupportedFieldTestSO
A throwaway Serenity ScriptableObject carrying a field kind the recipe codec cannot represent (a UnityEngine.Gradient), so the tests can prove that such a field is reported loudly on export and on import instead of silently dropped. It lives in its own same-named file so Unity can bind its script when the tests create it as an asset.
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.
SerenityRecipeAchievementExportTests
Covers the achievements exporter and the export → re-import round trip: the authored fields and
the [SerializeReference] condition tree must survive a trip through JSON and land in a second
folder unchanged, and an achievement whose no-code trigger exists must export with
generateTrigger set so the re-import reproduces it.
SerenityRecipeAchievementImportTests
Covers the achievements section end to end: UnityAchievementDefinition creation with
its authored fields, the polymorphic Condition tree applied through
RecipeSerializedPropertyCodec, idempotent re-import, the generateTrigger companion
UnityEventDispatcherSignalDefinition wired to UnlockAchievementSignal, and
Addressables registration under the achievements module label. Follows
SerenityRecipeFeedbackImportTests, the other typed section with a no-code trigger.
SerenityRecipeAchievementValidationTests
Covers what the achievements section refuses before anything is written: an entry that cannot be
identified, a value the asset cannot hold, and a reference — icon or condition type — that does not
resolve in this project. Validation-only runs, so no assets are created and no fixture folder is needed.
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; an asset a re-import leaves unchanged keeps its entry exactly as it was,
neither stripped nor re-tagged. Temp folders and Addressables entries are cleaned up after each test.
SerenityRecipeAudioClipSpatialSettingsTests
A clip definition's spatial group travels through the audioClips section: the five keys are imported and exported,
an absent key means "not authored", a rolloff or group the runtime would ignore is refused, and edited values beside a
toggle that is off are only a warning.
SerenityRecipeAudioDepthCueTests
An audio channel's depth-cue block travels through a recipe's generic assets section: the flat
fields (both flags, occlusion mask, occluded cutoff, level drop, reverb preset, occluded wet share and
reverberated voice cap) are exported and imported, the two curves are marked as not recipe-authorable so
they are absent from an export, raise no warning on either side and keep whatever the asset already
holds, and the nested block with its layer mask is read without an error.
SerenityRecipeDuplicateIdentityTests
A Guid that more than one option — or more than one submit signal of one option — claims is a data defect a recipe cannot resolve, whether it sits on the asset or in the recipe: the import reports it, naming the asset and the Guid, and writes nothing to that view rather than growing it by an option or a signal per run. A recipe entry that claims the Guid of an option or signal another entry already met is refused the same way. A recipe entry whose own Guid matches nothing, yet whose fallback key — an option's Id, a signal's position and type — names an existing element carrying a different Guid, is a conflict: it is reported naming the view, the key and both Guids, and left out rather than appended as a second element of that name. Proven over copies of the real shipped main menu and exit-application modal.
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), a re-import that reports both unchanged, 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).
SerenityRecipeFieldKindTests
Field kinds the generic assets section must either carry exactly or report loudly: a
UnityEngine.LayerMask (the real ExcludeLayerMask) round-trips as a
first-class kind, and a field the codec cannot represent is named — asset and field — in the export report
and again in the import report, never dropped in silence.
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.
SerenityRecipeImportFlowTests
The importer window's flow: its primary action stages the import behind an in-window confirmation that shows the plan — the counts and the assets — and writes nothing until the author confirms; the confirmed run is the plan that was shown, and a plan that changed in between is staged again instead of run.
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.
SerenityRecipeLocalizationRoundTripTests
The idempotence contract of the recipe localization section, over a copy of the shipped "Global" String
Table Collection: re-importing an unedited export writes no table and says so, the dry run plans exactly what
the import touches, and one edited translation lands on the one table of its locale and is reported by key.
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.
SerenityRecipeMenuOptionIdentityTests
How a recipe's menu options meet the options an existing menu already owns, over a copy of the real shipped main menu: options are matched by their Guid (by their Id when the recipe carries none), an option the recipe leaves out is left untouched, a new one is appended with a Guid of its own, and nothing is blanked because a position moved. A recipe that lists every option in another order reorders the menu; one that lists only some keeps the menu's order. Every option the import writes leaves with a Guid — a blank one is filled on its first write — and every shipped option already carries one. Each shipped option's action binding (its bound value, id and guid) must survive every import.
SerenityRecipeOptionSignalIdentityTests
How a recipe option's submit signals meet the signals the option already owns, over a copy of the real shipped exit-application modal (its YES option dispatches two signals): a signal is matched by its Guid — by its position and type when the recipe carries none — a signal the recipe leaves out is left untouched, a new one is appended with a Guid of its own, nothing shifts, a signal with a blank Guid gets one on its first write, and an empty list clears nothing.
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.
SerenityRecipeRoundTripTests
The idempotence contract of the Project Recipe tools, proven over copies of real shipped assets and the shipped
String Table Collection: importing a project's own unedited export changes no file — no copy, no .meta,
and no project file outside the copies (Addressables data, shipped localization tables), with Addressables
registration off or on — and says so; an edited field lands on exactly the asset that carries it; and two
identical imports touch the same (empty) set of files.
SerenityRecipeSchemaHonestyTests
The exported recipe describes the model the tools really have: no section the exporter can never fill, the
kinds that have no typed section of their own land in the generic assets section the exporter's info
box names, the String Table Collections land in localization, and the exporter, the importer and the
discovery registry agree on the same set of sections.
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.
SerenityRecipeTemplateGeneratorCutsceneTests
The cutscene stub the Recipe Template Generator writes teaches the dialog stage, and what it teaches passes the importer's checks without a warning about that stage.
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.