Namespace Serenity.AssetPrefetcher.Tests.Editor.Builder
Classes
CreatePrefetchPolicyWindowDeletedSourceReloadTests
A prefetch profile row loaded from the registry being edited, whose profile asset the author then deletes
before a script compile, must come back saying so: the row keeps its edits and is created again on
confirm, the Configure step names the row, where its asset was and how to skip it, and the Summary lists
it as created because the original was deleted. Drives the window's own OnDisable/OnEnable
around a reload that loses every scratch instance.
CreatePrefetchPolicyWindowRealRunDriver
Runs CreatePrefetchPolicyWindow for real: a registry with its one required default profile is
created in the fixture folder, picked as the window's target, and updated in place — the shape
CreatePrefetchPolicyWindowRowBindingTests drives.
CreatePrefetchPolicyWindowReloadSafetyTests
EditMode tests proving CreatePrefetchPolicyWindow re-attaches to its surviving per-row
scratch drafts after a domain reload instead of rebuilding from disk and losing unsaved edits. A real
script recompile cannot be driven from this suite, so
Serenity.AssetPrefetcher.Infrastructure.Editor.Builder.CreatePrefetchPolicyWindow.SimulateDomainReloadForTests reproduces only what a reload
leaves behind — see that seam's own remarks for what stays unverified. Mirrors
CreateSystemConfigurationSettingsWindowReloadSafetyTests.
CreatePrefetchPolicyWindowRowBindingTests
Proves the row-binding rule CreatePrefetchPolicyWindow and CreateFromDrafts(IReadOnlyList<SerenityWizardScratchDraft<PrefetchPolicyProfile>>, string, string, bool, UnboundRowWriteMode) enforce together: a row seeded from an existing profile stays bound to THAT asset regardless of an Id edit, and any row whose current Id collides with a DIFFERENT existing profile blocks the primary action instead of silently overwriting it — retyping a seeded row's Id to match another existing profile's Id never resolves-and-overwrites that OTHER asset, and the original is never dropped from the registry.
CreatePrefetchPolicyWindowUpdateInPlaceTests
Proves CreatePrefetchPolicyWindow against the shared
UpdateInPlaceRoundTripContract: reopening the wizard on an existing registry and confirming
with zero edits must leave every field of every referenced profile untouched, MaxSizeMB included.
This is the first adopter to exercise the contract's genuinely
multi-asset shape (two profiles, not the trivial one-asset case).
PrefetchPolicyCreatorTests
EditMode tests for PrefetchPolicyCreator. Every test targets fixture asset paths under a private temp folder — the real project's own PrefetchPolicyRegistry/PrefetchPolicyProfile assets, if any, are never touched — and every test passes an explicit RegistryAssetPath so the project-wide registry search never resolves to (or is made ambiguous by) the real project's own registry asset.