Class ExtensionPointGenerationTests
EditMode tests for Create(Input) across the Store/Repository/Gateway/Factory/Installer
extension point kinds (Catalog V2). Mirrors ServiceExtensionCreatorGenerationTests'
conventions: every input uses RegisterAsAddressables = false so a test run never touches the
project's real Addressables settings, and every test targets its own uniquely-named subfolder.
Inherited Members
Namespace: Serenity.ServiceExtensionCreator.Tests.Editor
Assembly: Serenity.ServiceExtensionCreator.Tests.Editor.dll
Syntax
public class ExtensionPointGenerationTests : MetaFileRaceGuardedFixture
Constructors
ExtensionPointGenerationTests()
Declaration
public ExtensionPointGenerationTests()
Methods
Create_CalledTwiceWithIdenticalInput_ProducesByteIdenticalStoreSource()
Declaration
public void Create_CalledTwiceWithIdenticalInput_ProducesByteIdenticalStoreSource()
Create_ClassKind_GeneratesSubclassUnderInfrastructureSubclassesWithNoWiring()
End-to-end Class-kind generation against the first REAL discoverable user class (the Tests
assembly's own fixtures are excluded by design — skipped, not silently passed, when the project has
none loaded): the subclass lands at Infrastructure/Subclasses/{TypeName}.cs deriving the user
class, the root is the whole type name (no kind suffix stripped), no Installation layer exists, and
the README carries the generic manual-wiring note.
Declaration
public void Create_ClassKind_GeneratesSubclassUnderInfrastructureSubclassesWithNoWiring()
Create_FactoryKind_GeneratesClassOnlyWithNoWiring()
Declaration
public void Create_FactoryKind_GeneratesClassOnlyWithNoWiring()
Create_FailingAfterBackendAssetWasRetagged_RollsBackTheAssetAndItsAddressablesEntry()
The ONE test that opts into RegisterAsAddressables = true: rollback after a failure that
happens AFTER the backend .asset was created and retagged must remove the asset AND its
AddressableAssetEntry — deleting the asset alone would leave a dangling missing-GUID entry in
the settings. Failure injection reuses the stale-AssetDatabase-cache mechanism documented on
Create_WhenTheTargetFolderDisappearsUnderneathIt_RollsBackTheWholeTree(), but stales only
the Tests subfolder so everything up to and including the retag succeeds first (Store kind +
CreateNew, whose test-stub write is the first artifact after the
Installation layer). Group state is snapshot-compared and force-cleaned in all cases so the project's
real Addressables settings are never polluted (project rule — see CLAUDE.md's Addressables section).
Declaration
public void Create_FailingAfterBackendAssetWasRetagged_RollsBackTheAssetAndItsAddressablesEntry()
Create_GatewayKind_ForMusicPlayer_SkipsWiringAndWarnsWhenNoHookExists()
Declaration
public void Create_GatewayKind_ForMusicPlayer_SkipsWiringAndWarnsWhenNoHookExists()
Create_GatewayKind_Fresh_GeneratesGatewayClassAndInstallerHookSubclass()
Declaration
public void Create_GatewayKind_Fresh_GeneratesGatewayClassAndInstallerHookSubclass()
Create_InstallerKind_GeneratesSubclassAndBackendAssetWithNoStoreClass()
Declaration
public void Create_InstallerKind_GeneratesSubclassAndBackendAssetWithNoStoreClass()
Create_RepositoryKind_Decorator_WrapsBaseHookResult()
Declaration
public void Create_RepositoryKind_Decorator_WrapsBaseHookResult()
Create_RepositoryKind_Fresh_GeneratesRepositoryClassAndInstallerHookSubclass()
Declaration
public void Create_RepositoryKind_Fresh_GeneratesRepositoryClassAndInstallerHookSubclass()
Create_RepositoryKind_SubclassWithAsmdefModeCreateNew_CodeLayerAsmdefReferencesTheChosenBaseChain()
The Subclass style's code-layer asmdef must reference the subclassed base's assembly and everything
its restated signatures touch (base-class chain + virtual-member signature assemblies) — the
generated class restates the base's virtual signatures in source, and asmdef references are not
transitive. The base here is the canonical UnityScoreRepository (empty
SubclassBaseTypeName); a user-generated base follows the same collector, covered by the live
smoke test.
Declaration
public void Create_RepositoryKind_SubclassWithAsmdefModeCreateNew_CodeLayerAsmdefReferencesTheChosenBaseChain()
Create_RepositoryKind_WithAsmdefModeCreateNew_InstallationAsmdefReferencesInstallerBaseTypeChain()
Regression coverage for a real gap the live smoke test caught: UnityScoreInstaller lives in
Serenity.UnityScore.Installation but its base class ScoreInstaller lives in the
separate Serenity.Score.Installation assembly. A generated MongoUnityScoreInstaller :
UnityScoreInstaller needs BOTH referenced (Unity asmdef references are not transitive, and the
C# compiler must resolve a named base type's own base classes too) or the generated Installation
asmdef fails to compile with CS0012. Skip-based tests elsewhere in
this file never generate a real asmdef, so only a CreateNew test
like this one exercises the reference set for real.
Declaration
public void Create_RepositoryKind_WithAsmdefModeCreateNew_InstallationAsmdefReferencesInstallerBaseTypeChain()
Create_StoreKind_BespokeStoreWithNoBackendHook_GeneratesClassOnlyWithManualWiringNote()
A bespoke Store contract — one that is neither IBlobStore nor IKeyValueStore, so its
WiringCapability is None (CheckpointStore is the real, shipping example) — must
NOT get any backend wiring: a generated PersistenceInstaller override for it could not even
compile (the generated store does not implement IBlobStore, the hook's return type). Only the
class + README are generated, with a manual-wiring warning and README note, mirroring the
Repository/Gateway no-hook degradation. The IBlobStore/IKeyValueStore positive path (backend wiring
IS generated) stays pinned by Create_StoreKind_Fresh_GeneratesStoreClassInstallerAndBackendAsset()
and Create_StoreKind_OnKeyValueStore_OverridesInstallKeyValueStoreAndCarriesTheComplementNote().
Declaration
public void Create_StoreKind_BespokeStoreWithNoBackendHook_GeneratesClassOnlyWithManualWiringNote()
Create_StoreKind_Fresh_EmitsVirtualMembers()
Extension-point Fresh classes share the Service kind's virtual emission: every generated
contract-member stub is public virtual, so the generated store is itself a subclass base.
Declaration
public void Create_StoreKind_Fresh_EmitsVirtualMembers()
Create_StoreKind_Fresh_GeneratesStoreClassInstallerAndBackendAsset()
Declaration
public void Create_StoreKind_Fresh_GeneratesStoreClassInstallerAndBackendAsset()
Create_StoreKind_OnBlobStore_DoesNotCarryTheKeyValueComplementNote()
Declaration
public void Create_StoreKind_OnBlobStore_DoesNotCarryTheKeyValueComplementNote()
Create_StoreKind_OnKeyValueStore_OverridesInstallKeyValueStoreAndCarriesTheComplementNote()
Declaration
public void Create_StoreKind_OnKeyValueStore_OverridesInstallKeyValueStoreAndCarriesTheComplementNote()
Create_WhenTheTargetFolderDisappearsUnderneathIt_RollsBackTheWholeTree()
Declaration
public void Create_WhenTheTargetFolderDisappearsUnderneathIt_RollsBackTheWholeTree()
SetUp()
Declaration
public void SetUp()
TearDown()
Declaration
public void TearDown()