Class CreatePlayerInputWindowUpdateInPlaceTests
Proves CreatePlayerInputWindow against the shared UpdateInPlaceRoundTripContract and its by-Id-in-folder target lifecycle for the Definition asset: typing an existing Id and confirming with zero edits (or after editing one unrelated scalar field) must never wipe the Definition's own field values or its InputAsset/OnPrimaryJoinTask references.
Inherited Members
Namespace: Serenity.InputGateway.Tests.Editor.Builder
Assembly: Serenity.PlayerInput.Tests.Editor.dll
Syntax
public class CreatePlayerInputWindowUpdateInPlaceTests
Constructors
CreatePlayerInputWindowUpdateInPlaceTests()
Declaration
public CreatePlayerInputWindowUpdateInPlaceTests()
Methods
OneTimeTearDown()
Declaration
public void OneTimeTearDown()
RunPrimaryActionForTests_AfterEditingOneUnrelatedScalarField_KeepsReferencesIntact()
Declaration
public void RunPrimaryActionForTests_AfterEditingOneUnrelatedScalarField_KeepsReferencesIntact()
RunPrimaryActionForTests_AfterFreeIdFollowingAnExisting_CreatesANewAssetWithAFreshGuidAndLeavesTheSourceUntouched()
The create half of the CRITICAL scenario: A → a genuinely free Id → confirm must create a brand-new asset with a fresh Guid, carrying the edited (copied-from-A) values, while A itself is left byte-identical on disk.
Declaration
public void RunPrimaryActionForTests_AfterFreeIdFollowingAnExisting_CreatesANewAssetWithAFreshGuidAndLeavesTheSourceUntouched()
RunPrimaryActionForTests_AfterRetargetingToADifferentExistingAsset_UpdatesOnlyThatAssetAndLeavesTheOtherUntouched()
The reseed half of the CRITICAL scenario: A → a DIFFERENT existing asset B must reseed the draft from B (discarding any not-yet-committed edit made on A's copy), and confirming must only touch B — A must be left byte-identical.
Declaration
public void RunPrimaryActionForTests_AfterRetargetingToADifferentExistingAsset_UpdatesOnlyThatAssetAndLeavesTheOtherUntouched()
RunPrimaryActionForTests_AfterSourceAssetDeletedOnDisk_DoesNotThrowAndDoesNotOverwriteAnUnrelatedAsset()
Declaration
public void RunPrimaryActionForTests_AfterSourceAssetDeletedOnDisk_DoesNotThrowAndDoesNotOverwriteAnUnrelatedAsset()
RunPrimaryActionForTests_AfterTypoDetourAndReturnToSameId_ChangesOnlyTheEditedFieldOnThatAsset()
The zero-other-edits half of the CRITICAL scenario: after the typo detour and a return to the same Id, confirming must change ONLY the edited field on the real asset — never any other field.
Declaration
public void RunPrimaryActionForTests_AfterTypoDetourAndReturnToSameId_ChangesOnlyTheEditedFieldOnThatAsset()
RunPrimaryActionForTests_AssetCreatedExternallyAtPlannedPathAfterValidation_IsRefusedAndExistingAssetUntouched()
Declaration
public void RunPrimaryActionForTests_AssetCreatedExternallyAtPlannedPathAfterValidation_IsRefusedAndExistingAssetUntouched()
RunPrimaryActionForTests_CreateNew_ThenConfirmAgain_UpdatesTheJustCreatedAssetInPlace()
Declaration
public void RunPrimaryActionForTests_CreateNew_ThenConfirmAgain_UpdatesTheJustCreatedAssetInPlace()
RunPrimaryActionForTests_MultiplayerFreeIdChainAfterAnExisting_NewDefinitionReferencesTheNewSubAssetsNotTheSourceChain()
Multiplayer cross-reference half of the CRITICAL scenario: a whole chain (Definition, Routing, Join Gate, Device Filter) copied to a brand-new Id set must reference ONLY the new sub-assets it just created — never the source chain's own sub-assets — and the source chain must be untouched.
Declaration
public void RunPrimaryActionForTests_MultiplayerFreeIdChainAfterAnExisting_NewDefinitionReferencesTheNewSubAssetsNotTheSourceChain()
RunPrimaryActionForTests_MultiplayerOnlyDefinitionIdChangedToFreeWithARoutingEdit_UpdatesOnlyThatFieldOnChainAsRouting()
Partial Id change plus one scalar edit: changing ONLY the Definition Id to a free one AND editing one field on the Routing draft must update ONLY that field on chain A's own Routing asset (still resolved in place by its own unchanged Id, still shared with the new Definition) — Join Gate and Device Filter stay fully byte-identical.
Declaration
public void RunPrimaryActionForTests_MultiplayerOnlyDefinitionIdChangedToFreeWithARoutingEdit_UpdatesOnlyThatFieldOnChainAsRouting()
RunPrimaryActionForTests_MultiplayerOnlyDefinitionIdChangedToFree_CreatesNewDefinitionSharingChainAsUnchangedSubAssets()
Partial Id change (CRITICAL): changing ONLY the Definition Id to a free one, with ZERO other edits, must create a NEW Definition (fresh Guid) that references chain A's EXISTING Routing/Join Gate/Device Filter — resolved and re-committed by their own UNCHANGED Ids, not recreated — while chain A's Definition and all three of its sub-assets stay completely byte-identical. A wizard that only ever tested changing all four Ids together could not tell this apart from an "everything is new" bug.
Declaration
public void RunPrimaryActionForTests_MultiplayerOnlyDefinitionIdChangedToFree_CreatesNewDefinitionSharingChainAsUnchangedSubAssets()
SetIdForTests_ExistingId_DraftSurfacesTheAssetsOwnFieldsAndReferences()
Declaration
public void SetIdForTests_ExistingId_DraftSurfacesTheAssetsOwnFieldsAndReferences()
SetIdForTests_SimulatedDomainReloadMidEdit_KeepsEditsAndSourceBinding()
Declaration
public void SetIdForTests_SimulatedDomainReloadMidEdit_KeepsEditsAndSourceBinding()
SetIdForTests_TwiceOnDifferentIds_ReseedsFromTheNewTarget()
Declaration
public void SetIdForTests_TwiceOnDifferentIds_ReseedsFromTheNewTarget()
SetIdForTests_TypingAFreeIdAfterAnExisting_KeepsCurrentDraftValuesAndRebindsOnReturn()
An Id typo detour through a free Id must never wipe the draft. The draft keeps its current values while unbound, and typing the SAME existing Id back rebinds without reseeding — so the author's in-progress edit survives the whole detour.
Declaration
public void SetIdForTests_TypingAFreeIdAfterAnExisting_KeepsCurrentDraftValuesAndRebindsOnReturn()
SetIdForTests_ZeroEditsAfterTyping_LeavesEveryFieldIncludingReferencesUnchanged()
Declaration
public void SetIdForTests_ZeroEditsAfterTyping_LeavesEveryFieldIncludingReferencesUnchanged()
SetModeMultiplayer_ExistingSubAssetIds_SeedsRoutingJoinGateAndDeviceFilterDrafts()
Multiplayer-specific: proves the Routing/Join Gate/Device Filter drafts are ALSO seeded from their own existing assets, not left at hardcoded defaults, mirroring the Definition's own guarantee.
Declaration
public void SetModeMultiplayer_ExistingSubAssetIds_SeedsRoutingJoinGateAndDeviceFilterDrafts()
SetUp()
Declaration
public void SetUp()
SimulateDomainReloadForTests_InEachOfTheThreeBindingStates_KeepsValuesAndBindingState()
A simulated domain reload must preserve both the draft's values AND its binding state (bound to A, unbound, or bound to a different asset B) exactly as it was before the reload — in each of the three states Serenity.Global.Infrastructure.Editor.SerenityWizardByIdAssetBinding`1.ConsumeSeed(System.Action{`0}) can leave the draft in.
Declaration
public void SimulateDomainReloadForTests_InEachOfTheThreeBindingStates_KeepsValuesAndBindingState()
SummaryAssetLinesForTests_BrandNewChain_DescribesAllFourAsCreates()
A brand-new chain — nothing resolves by Id yet — must describe all four assets as creates, under the planned folder, with no "shared" wording (there is nothing yet to share).
Declaration
public void SummaryAssetLinesForTests_BrandNewChain_DescribesAllFourAsCreates()
SummaryAssetLinesForTests_ExistingChainReopened_DescribesAllFourAsUpdatesWithNoSharedWording()
Reopening on chain A's own Ids, with zero edits, must describe all four assets as updates to their own existing paths — and never as "shared", since a Definition being updated in place never counts as sharing its own sub-assets with itself.
Declaration
public void SummaryAssetLinesForTests_ExistingChainReopened_DescribesAllFourAsUpdatesWithNoSharedWording()
SummaryAssetLinesForTests_OnlyDefinitionIdChangedToFree_DescribesSubAssetsAsUpdatesSharedWithChainA()
The partial-Id-change scenario made truthful: a new Definition copy that keeps chain A's own Routing/Join Gate/Device Filter Ids must describe those three as UPDATES to chain A's own existing assets, AND flag each one as shared with chain A's own (still-existing) Definition — the sharing this Summary step exists to surface before the author confirms.
Declaration
public void SummaryAssetLinesForTests_OnlyDefinitionIdChangedToFree_DescribesSubAssetsAsUpdatesSharedWithChainA()
TearDown()
Declaration
public void TearDown()