logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class CompositeTestAchievementCondition

    A composite condition a test builds by hand: its children live in a list a test can grow after construction, and its own validation bubbles the first child error it finds — the two things a Business-side suite needs from a combiner, without a reference to the Infrastructure-side composite base class those combiners are normally authored from.

    Inheritance
    object
    CompositeTestAchievementCondition
    Namespace: Serenity.Achievements.Tests.Fakes
    Assembly: Tests.dll
    Syntax
    public class CompositeTestAchievementCondition : AchievementCondition
    Remarks

    AppendChild(AchievementCondition) is what lets SelfReferencing() build the cyclic graph a corrupted [SerializeReference] asset produces: a Business-side suite needs that same malformed shape to prove AchievementConditionTree refuses it, without depending on the real composite base class those graphs are normally authored from.

    Constructors

    CompositeTestAchievementCondition(params AchievementCondition[])

    Creates a composite over the given children.

    Declaration
    public CompositeTestAchievementCondition(params AchievementCondition[] children)
    Parameters
    Type Name Description
    AchievementCondition[] children

    The children to combine. Null is treated as empty.

    Properties

    Children

    Declaration
    public override IReadOnlyList<AchievementCondition> Children { get; }
    Property Value
    Type Description
    IReadOnlyList<AchievementCondition>

    DisplayName

    Declaration
    public override string DisplayName { get; }
    Property Value
    Type Description
    string

    Methods

    AppendChild(AchievementCondition)

    Appends a child after construction — how a test builds a cyclic or self-referencing tree.

    Declaration
    public void AppendChild(AchievementCondition child)
    Parameters
    Type Name Description
    AchievementCondition child

    The child to append, which may be this same instance.

    CollectSignalTypeNames(ICollection<string>)

    Declaration
    public override void CollectSignalTypeNames(ICollection<string> sink)
    Parameters
    Type Name Description
    ICollection<string> sink

    IsMet(in AchievementEvaluationContext)

    Declaration
    public override bool IsMet(in AchievementEvaluationContext context)
    Parameters
    Type Name Description
    AchievementEvaluationContext context
    Returns
    Type Description
    bool

    Reset()

    Declaration
    public override void Reset()

    SelfReferencing()

    A composite that holds itself, the shape a corrupted condition graph can take.

    Declaration
    public static CompositeTestAchievementCondition SelfReferencing()
    Returns
    Type Description
    CompositeTestAchievementCondition

    Validate()

    Declaration
    public override string Validate()
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved