Class SingletonSettingsCreationEngineTests
EditMode tests for SingletonSettingsCreationEngine<TSettings, TInput, TResult>, driven through a scratch subclass. Built on real assets under a private temp folder wiped in TearDown(), because the contract is about what lands on disk, what the Addressables settings end up holding, and what a rollback puts back — none of which survives an in-memory double. Only the registration test opts into Addressables, and it removes the entry it created.
Inherited Members
Namespace: Serenity.StructuredPersistence.Tests.Editor
Assembly: Serenity.StructuredPersistence.Tests.Editor.dll
Syntax
public class SingletonSettingsCreationEngineTests
Constructors
SingletonSettingsCreationEngineTests()
Declaration
public SingletonSettingsCreationEngineTests()
Methods
ApplyFieldsToExisting_Overridden_IsUsedOnlyByTheUpdatePathNotByCreate()
Declaration
public void ApplyFieldsToExisting_Overridden_IsUsedOnlyByTheUpdatePathNotByCreate()
Create_ExistingPath_UpdatesInPlaceAndReportsWasUpdate()
Declaration
public void Create_ExistingPath_UpdatesInPlaceAndReportsWasUpdate()
Create_ExtraAssetsThrow_RollsBackTheCreatedAssetAndRestoresTheEditedOne()
Declaration
public void Create_ExtraAssetsThrow_RollsBackTheCreatedAssetAndRestoresTheEditedOne()
Create_New_RegistersTheCreatedAssetUnderTheModuleLabel()
Declaration
public void Create_New_RegistersTheCreatedAssetUnderTheModuleLabel()
Create_New_WritesTheAssetWithItsIdGuidAndFields()
Declaration
public void Create_New_WritesTheAssetWithItsIdGuidAndFields()
OneTimeSetUp()
Declaration
public void OneTimeSetUp()
OneTimeTearDown()
Declaration
public void OneTimeTearDown()
SetUp()
Declaration
public void SetUp()
TearDown()
Declaration
public void TearDown()
UpdateExistingInPlace_ApplyFieldsThrows_RestoresTheAssetsFieldsAndId()
Mirrors Create_ExtraAssetsThrow_RollsBackTheCreatedAssetAndRestoresTheEditedOne()
for the update path: ApplyFields is a subclass's code too, and a subclass that throws
halfway through it must leave the edited asset exactly as it stood before the call — both the
fields ApplyFields half-wrote and the Id the engine had already written ahead of it.
Declaration
public void UpdateExistingInPlace_ApplyFieldsThrows_RestoresTheAssetsFieldsAndId()
UpdateExistingInPlace_NoOverride_ForwardsToApplyFields()
Declaration
public void UpdateExistingInPlace_NoOverride_ForwardsToApplyFields()
UpdateExistingInPlace_SkipsValidationAndStillReportsWasUpdate()
Declaration
public void UpdateExistingInPlace_SkipsValidationAndStillReportsWasUpdate()
ValidateIdentity_BlankAssetNameWhileUpdating_ReportsNothing()
An update names the asset it edits, so the asset-name field is not part of that request and an empty one must not block it.
Declaration
public void ValidateIdentity_BlankAssetNameWhileUpdating_ReportsNothing()
ValidateIdentity_BlankAssetName_ReportsTheAssetNameRule()
Declaration
public void ValidateIdentity_BlankAssetName_ReportsTheAssetNameRule()
ValidateIdentity_BlankId_ReportsTheIdRule()
Declaration
public void ValidateIdentity_BlankId_ReportsTheIdRule()
ValidateIdentity_NeverInvokesValidateBeyondIdentity()
Declaration
public void ValidateIdentity_NeverInvokesValidateBeyondIdentity()
Validate_ExistingPathWithNothingThere_ReportsThatNoAssetWasFound_ByItsDisplayName()
Declaration
public void Validate_ExistingPathWithNothingThere_ReportsThatNoAssetWasFound_ByItsDisplayName()
Validate_IdentityInvalid_SkipsValidateBeyondIdentity()
Declaration
public void Validate_IdentityInvalid_SkipsValidateBeyondIdentity()
Validate_IdentityValid_InvokesValidateBeyondIdentityOnce()
Declaration
public void Validate_IdentityValid_InvokesValidateBeyondIdentityOnce()
Validate_NewAssetWithADuplicateId_ReportsAnError_NamingTheAssetByItsDisplayName()
Declaration
public void Validate_NewAssetWithADuplicateId_ReportsAnError_NamingTheAssetByItsDisplayName()
Validate_NoInput_ReportsTheMissingInputError()
Declaration
public void Validate_NoInput_ReportsTheMissingInputError()
Validate_OutputFolderOutsideAssets_ReportsTheFolderError()
Declaration
public void Validate_OutputFolderOutsideAssets_ReportsTheFolderError()
Validate_TargetPathAlreadyOccupied_ReportsTheCollision()
Declaration
public void Validate_TargetPathAlreadyOccupied_ReportsTheCollision()
Validate_UpdatingRenamedToAGenuinelyFreeId_ReportsNoDuplicateFinding()
Companion regression guard: renaming to a genuinely free Id during an update must still succeed, with no duplicate finding of either severity — the pre-existing rename-disclosure warning is unrelated and expected regardless.
Declaration
public void Validate_UpdatingRenamedToAGenuinelyFreeId_ReportsNoDuplicateFinding()
Validate_UpdatingRenamedToAnIdThatCollidesWithAnotherAsset_ReportsAnError()
The other half of the same contract: renaming TO an Id another asset already holds is a genuinely new ambiguity this run would create, and must still block. This rename ALSO trips the unrelated rename-disclosure warning — this only pins that no DUPLICATE warning (as opposed to an error) is reported alongside it.
Declaration
public void Validate_UpdatingRenamedToAnIdThatCollidesWithAnotherAsset_ReportsAnError()
Validate_UpdatingWithAnUnchangedIdThatCollidesWithAnotherAsset_ReportsAWarningNotAnError()
Two assets already share a pre-existing Id, predating this run (simulated here by assigning Id directly, bypassing validation). Updating one of them WITHOUT changing its Id must stay possible — the duplicate is not something this run is creating — so it is a warning, not a blocking error.
Declaration
public void Validate_UpdatingWithAnUnchangedIdThatCollidesWithAnotherAsset_ReportsAWarningNotAnError()