logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ExtensionPointValidationTests

    EditMode tests for Validate(Input) across the Store/Repository/Gateway/Factory/Installer extension point kinds (Catalog V2). Mirrors ServiceExtensionCreatorValidationTests' conventions: a single shared temp folder for the whole fixture, since Validate never writes into it.

    Inheritance
    object
    MetaFileRaceGuardedFixture
    ExtensionPointValidationTests
    Inherited Members
    MetaFileRaceGuardedFixture.SuppressFailingLogMessagesForFixture()
    MetaFileRaceGuardedFixture.RestoreFailingLogMessages()
    MetaFileRaceGuardedFixture.SuppressFailingLogMessagesForTest()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.ServiceExtensionCreator.Tests.Editor
    Assembly: Serenity.ServiceExtensionCreator.Tests.Editor.dll
    Syntax
    public class ExtensionPointValidationTests : MetaFileRaceGuardedFixture

    Constructors

    ExtensionPointValidationTests()

    Declaration
    public ExtensionPointValidationTests()

    Methods

    ComposeRoot_StoreKind_StripsOnlyTheGenericKindSuffix()

    Declaration
    public void ComposeRoot_StoreKind_StripsOnlyTheGenericKindSuffix()

    ComposeServiceTypeName_StoreKind_ComposesContractDerivedSuffix()

    Declaration
    public void ComposeServiceTypeName_StoreKind_ComposesContractDerivedSuffix()

    ComposeTypeName_ClassKind_ComposesNameFromTheClassSimpleName()

    The Class kind's naming has no kind suffix to strip — the generated type is {Name}{ClassName} and the root stays the whole type name. Constructed descriptor: ComposeTypeName is pure and never reads the catalog.

    Declaration
    public void ComposeTypeName_ClassKind_ComposesNameFromTheClassSimpleName()

    IsSubclassStyleAvailable_NoEligibleBases_ReportsUnavailableWithTheNoImplementerReason()

    The Subclass style must report unavailable — with the no-eligible-implementer reason — for a first-implementation descriptor (no implementer, so no eligible subclass base either). The descriptor is constructed directly: no production contract currently has zero public implementers (even ISystemConfigurationSnapshotStore resolves the public UnitySystemConfigurationService), so this state cannot be reached through the live catalog. The corresponding end-to-end Validate paths (Decorator rejected with "use Fresh for the first implementation", Fresh accepted) resolve their descriptor from the catalog BY NAME and are therefore equally unreachable from a unit test — they are covered by the orchestrator's live smoke test instead.

    Declaration
    public void IsSubclassStyleAvailable_NoEligibleBases_ReportsUnavailableWithTheNoImplementerReason()

    OneTimeSetUp()

    Declaration
    public void OneTimeSetUp()

    OneTimeTearDown()

    Declaration
    public void OneTimeTearDown()

    ResolveUserClassDescriptor_AmbiguousSimpleName_ReturnsNullWithActionableError()

    Two user classes may share a simple name across namespaces — the Class-kind resolver must reject the simple name with an actionable error instead of silently first-picking, and a full name must disambiguate. Constructed descriptors over the two same-simple-name collision fixtures: test assemblies are excluded from discovery, so the resolver seam is list-driven precisely to stay testable here.

    Declaration
    public void ResolveUserClassDescriptor_AmbiguousSimpleName_ReturnsNullWithActionableError()

    ResolveUserClassDescriptor_FullName_ResolvesAmongAmbiguousSimpleNames()

    Declaration
    public void ResolveUserClassDescriptor_FullName_ResolvesAmongAmbiguousSimpleNames()

    ResolveUserClassDescriptor_SimpleNameSharedAcrossTiers_IsAmbiguous()

    The identity/ambiguity rules span BOTH selectable user-class tiers: a simple name shared between an eligible class and a needs-virtualization class is just as ambiguous as within one tier.

    Declaration
    public void ResolveUserClassDescriptor_SimpleNameSharedAcrossTiers_IsAmbiguous()

    ResolveUserClassDescriptor_UniqueSimpleName_Resolves()

    Declaration
    public void ResolveUserClassDescriptor_UniqueSimpleName_Resolves()

    Validate_AllowsDecoratorStyleForRepositoryExtensionPoint()

    Declaration
    public void Validate_AllowsDecoratorStyleForRepositoryExtensionPoint()

    Validate_AllowsFactoryKindWithFreshStyle()

    Declaration
    public void Validate_AllowsFactoryKindWithFreshStyle()

    Validate_AllowsFreshStyleForStoreExtensionPoint()

    Declaration
    public void Validate_AllowsFreshStyleForStoreExtensionPoint()

    Validate_AllowsInstallerKindWithSubclassStyle()

    Declaration
    public void Validate_AllowsInstallerKindWithSubclassStyle()

    Validate_AllowsSubclassStyleForRepositoryExtensionPoint()

    Declaration
    public void Validate_AllowsSubclassStyleForRepositoryExtensionPoint()

    Validate_ClassKind_AllowsSubclassStyleWithAsmdefSkip()

    Declaration
    public void Validate_ClassKind_AllowsSubclassStyleWithAsmdefSkip()

    Validate_ClassKind_RejectsAssemblyCSharpBaseWithCreateNew()

    A generated asmdef cannot reference Assembly-CSharp, so a Class-kind base living there is only generatable with AsmdefMode.Skip — any other mode must fail with the actionable message.

    Declaration
    public void Validate_ClassKind_RejectsAssemblyCSharpBaseWithCreateNew()

    Validate_ClassKind_RejectsEveryNonSubclassStyle(string)

    End-to-end Validate coverage for the Class kind requires a REAL discoverable user class (the Tests assembly's own types are excluded by design), so the first discovered one is used — the case is skipped, not silently passed, when the project has no eligible user class loaded.

    Declaration
    public void Validate_ClassKind_RejectsEveryNonSubclassStyle(string styleName)
    Parameters
    Type Name Description
    string styleName

    Validate_ClassKind_RejectsNotYetVirtualizedClass()

    Generation must never proceed against a not-yet-virtualized user class — the CLI resolves it (so the error can explain WHY) but Validate rejects with the virtualize-first message. Uses the first REAL discovered virtualizable class; skipped when the project has none loaded.

    Declaration
    public void Validate_ClassKind_RejectsNotYetVirtualizedClass()

    Validate_RejectsEmptyExtensionNameForExtensionPoint()

    Declaration
    public void Validate_RejectsEmptyExtensionNameForExtensionPoint()

    Validate_RejectsInstallerKindWithDecoratorStyle()

    Declaration
    public void Validate_RejectsInstallerKindWithDecoratorStyle()

    Validate_RejectsInstallerKindWithFreshStyle()

    Declaration
    public void Validate_RejectsInstallerKindWithFreshStyle()

    Validate_RejectsInvalidFolderForExtensionPoint()

    Declaration
    public void Validate_RejectsInvalidFolderForExtensionPoint()

    Validate_RejectsMissingExtensionPointName()

    Declaration
    public void Validate_RejectsMissingExtensionPointName()

    Validate_RejectsNamespaceInjectionPayloadForExtensionPoint()

    Declaration
    public void Validate_RejectsNamespaceInjectionPayloadForExtensionPoint()

    Validate_RejectsUnknownExtensionPoint()

    Declaration
    public void Validate_RejectsUnknownExtensionPoint()
    In this article
    © 2026 Serenity. All Rights Reserved