logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AsmdefReferenceWriterTests

    EditMode tests for AsmdefReferenceWriter: assembly-name resolution, required-reference sets per layer, and the brand-new-asmdef writer. Every mutation happens against a temp folder created for the test — a real project asmdef is never edited, since AsmdefReferenceWriter no longer mutates existing asmdefs at all (every generated layer owns its own folder and asmdef).

    Inheritance
    object
    MetaFileRaceGuardedFixture
    AsmdefReferenceWriterTests
    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 AsmdefReferenceWriterTests : MetaFileRaceGuardedFixture

    Constructors

    AsmdefReferenceWriterTests()

    Declaration
    public AsmdefReferenceWriterTests()

    Methods

    AppendTaskToProfile_CalledTwiceWithTheSameTask_DoesNotDuplicateTheEntry()

    Declaration
    public void AppendTaskToProfile_CalledTwiceWithTheSameTask_DoesNotDuplicateTheEntry()

    AppendTaskToProfile_OnAScratchProfile_AddsExactlyOneEntryAndMarksItDirty()

    Declaration
    public void AppendTaskToProfile_OnAScratchProfile_AddsExactlyOneEntryAndMarksItDirty()

    AppendTaskToProfile_RevertingTheAppend_RemovesExactlyThatTaskAndMarksDirty()

    Declaration
    public void AppendTaskToProfile_RevertingTheAppend_RemovesExactlyThatTaskAndMarksDirty()

    CreateAsmdef_TestAssembly_MatchesTheProjectsTestAsmdefShape()

    Declaration
    public void CreateAsmdef_TestAssembly_MatchesTheProjectsTestAsmdefShape()

    CreateAsmdef_WritesAValidAsmdefWithTheGivenNameNamespaceAndReferences()

    Declaration
    public void CreateAsmdef_WritesAValidAsmdefWithTheGivenNameNamespaceAndReferences()

    HasTestFrameworkAccess_FolderGovernedByAnAsmdefReferencingTestRunner_ReturnsTrue()

    Declaration
    public void HasTestFrameworkAccess_FolderGovernedByAnAsmdefReferencingTestRunner_ReturnsTrue()

    HasTestFrameworkAccess_FolderGovernedByAnAsmdefWithoutTestRunner_ReturnsFalse()

    Declaration
    public void HasTestFrameworkAccess_FolderGovernedByAnAsmdefWithoutTestRunner_ReturnsFalse()

    HasTestFrameworkAccess_FolderWithNoGoverningAsmdef_ReturnsFalse()

    Declaration
    public void HasTestFrameworkAccess_FolderWithNoGoverningAsmdef_ReturnsFalse()

    InstallationReferences_AlwaysIncludesTheCodeLayerAssembly()

    Declaration
    public void InstallationReferences_AlwaysIncludesTheCodeLayerAssembly()

    InstallationReferences_AutoRegister_DoesNotIncludeTheTaskDefinitionAssembly()

    Declaration
    public void InstallationReferences_AutoRegister_DoesNotIncludeTheTaskDefinitionAssembly()

    InstallationReferences_PipelineReplace_AlsoIncludesTheTaskDefinitionAssembly()

    Declaration
    public void InstallationReferences_PipelineReplace_AlsoIncludesTheTaskDefinitionAssembly()

    RequiredReferences_AlwaysIncludesGlobalApplicationAndTheAggregateInterfaceAssembly()

    Declaration
    public void RequiredReferences_AlwaysIncludesGlobalApplicationAndTheAggregateInterfaceAssembly()

    RequiredReferences_AlwaysIncludesGlobalDomainForIFoundationSettings()

    IService : IFoundationSettings, and IFoundationSettings lives in the separate Serenity.Global.Domain assembly — Unity asmdef references are not transitive, so any generated code implementing or naming an I{X}Service needs this listed explicitly. A generated asmdef missing it fails to compile with CS0012.

    Declaration
    public void RequiredReferences_AlwaysIncludesGlobalDomainForIFoundationSettings()

    RequiredReferences_ClassKindDescriptorFromAFrameworkGovernedAssembly_ReferencesNothing()

    The contract-assembly reference is gated through the framework-assembly filter — an asmdef cannot reference Assembly-CSharp (or Unity/BCL core modules), so a Class-kind descriptor whose base lives in such an assembly must yield NO reference to it instead of an invalid asmdef entry. Exercised with a UnityEngine type (same IsFrameworkAssembly gate as Assembly-CSharp, deterministically present); every other assembly the walk touches is framework-filtered too, so the set is empty.

    Declaration
    public void RequiredReferences_ClassKindDescriptorFromAFrameworkGovernedAssembly_ReferencesNothing()

    RequiredReferences_ExtensionPointWithNullConcreteType_OnlyIncludesContractAndMemberAssemblies()

    A first-implementation extension point has ConcreteType null. No production contract currently has zero public implementers (even ISystemConfigurationSnapshotStore resolves the public UnitySystemConfigurationService — see ExtensionPointCatalogTests.Discover_SystemConfigurationSnapshotStore_ResolvesThePublicServiceAsItsImplementer), so the descriptor is constructed directly here — RequiredReferences only reads the descriptor, never the catalog. The Fresh-style reference set must be exactly the contract's own assembly (this fixture contract has no members), with no concrete-assembly reference to add and no null dereference.

    Declaration
    public void RequiredReferences_ExtensionPointWithNullConcreteType_OnlyIncludesContractAndMemberAssemblies()

    RequiredReferences_InfrastructureFreshStyle_DoesNotIncludeTheConcreteServiceAssembly()

    InfrastructureFresh needs no concrete Unity service at all (unlike InfrastructureSubclass) — its reference set must stay exactly the same as BusinessFresh's: the fixed Global.Application/Global.Domain pair, the aggregate's own interface assembly, and every member-signature assembly, with no base-chain or concrete-service assembly pulled in.

    Declaration
    public void RequiredReferences_InfrastructureFreshStyle_DoesNotIncludeTheConcreteServiceAssembly()

    RequiredReferences_InfrastructureStyle_AlsoIncludesTheConcreteServiceAssembly()

    Declaration
    public void RequiredReferences_InfrastructureStyle_AlsoIncludesTheConcreteServiceAssembly()

    ResolveNearestAssemblyName_FolderUnderKnownAsmdef_ReturnsItsAssemblyName()

    Declaration
    public void ResolveNearestAssemblyName_FolderUnderKnownAsmdef_ReturnsItsAssemblyName()

    ResolveNearestAssemblyName_FolderWithNoGoverningAsmdef_ReturnsAssemblyCSharp()

    Declaration
    public void ResolveNearestAssemblyName_FolderWithNoGoverningAsmdef_ReturnsAssemblyCSharp()

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

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