logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ThemeModulePrefabBuilderRegistryTests

    EditMode tests for Serenity.Ui.Installation.Editor.Settings.Builder.ThemeModulePrefabBuilders -- the single-slot seam Serenity.UnityAchievements.Infrastructure.Editor uses to hand its Achievements.prefab builder back to Serenity.Ui.Installation.Editor.Settings.Builder.ThemePrefabFactory and AchievementsThemeRetrofitter, since the reverse reference those would otherwise need directly is an asmdef cycle (that assembly already references this one). This test assembly references the Achievements editor assembly (see this suite's own asmdef) purely so AchievementsThemePrefabRegistration's [InitializeOnLoad] constructor actually runs on domain load for the first test below to observe.

    Inheritance
    object
    ThemeModulePrefabBuilderRegistryTests
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.UiThemeValidation.Tests.Editor
    Assembly: Serenity.UiThemeValidation.Tests.Editor.dll
    Syntax
    public class ThemeModulePrefabBuilderRegistryTests

    Constructors

    ThemeModulePrefabBuilderRegistryTests()

    Declaration
    public ThemeModulePrefabBuilderRegistryTests()

    Methods

    Achievements_RegistrationRanOnDomainLoad_BuildsARealAchievementsPanel()

    Proves AchievementsThemePrefabRegistration's [InitializeOnLoad] static constructor actually ran on domain load, and that the delegate it put in the slot is the real builder -- not just non-null, but capable of producing the same panel ThemeCreatorAchievementsTests already asserts on.

    Declaration
    public void Achievements_RegistrationRanOnDomainLoad_BuildsARealAchievementsPanel()

    FindThemesMissingAchievements_SlotEmpty_ReturnsEmptyListInsteadOfThrowing()

    Mirrors what Serenity.Ui.Installation.Editor.Settings.Builder.AchievementsThemeRetrofitterWindow's OnGUI does with this exact return value every frame: an empty slot must make the read-only affected-scope preview report nothing missing, not throw the way the write path's RequireAchievementsPrefabBuilder does.

    Declaration
    public void FindThemesMissingAchievements_SlotEmpty_ReturnsEmptyListInsteadOfThrowing()

    GenerateAllComponents_SlotEmpty_SkipsAchievementsAndLogsAWarningInsteadOfFailing()

    Mirrors what a project build that never compiled the Achievements module in looks like: Serenity.Ui.Installation.Editor.Settings.Builder.ThemePrefabFactory.GenerateAllComponents(Serenity.Ui.Installation.Editor.Settings.Builder.GenerationContext) must skip the Achievements chrome and warn, not throw and abort the whole theme generation run.

    Declaration
    public void GenerateAllComponents_SlotEmpty_SkipsAchievementsAndLogsAWarningInsteadOfFailing()

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

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