logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityAchievementValidatorTests

    EditMode tests for SerenityAchievementValidator.

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

    Every finding that depends only on described input — the project-level rules, the settings asset's storefront slots, a refused judgement — is asserted through the validator's public seams, with the input the test wrote. That is deliberate: this validator scans the whole project, so a test that reached those rules through Run(SerenityValidationReport) would be asserting against whatever the repository happens to contain on the day it runs, and would start failing the first time somebody adds an achievement asset.

    What still goes through Run is only what a project scan is actually for — finding the assets and anchoring findings to their paths — plus one smoke test that it does not throw. Fixture assets live in a private temp folder and are deleted again, and the assertions look for the finding a fixture caused rather than counting the report.

    What each finding SAYS is not re-asserted here: that is AchievementAuthoringRulesTests' and AchievementProjectRulesTests' subject, and both run headlessly.

    Constructors

    SerenityAchievementValidatorTests()

    Declaration
    public SerenityAchievementValidatorTests()

    Methods

    AppendAchievementFindings_KeepsTheFindingsOfTheAchievementsThatCanBeJudged()

    Declaration
    public void AppendAchievementFindings_KeepsTheFindingsOfTheAchievementsThatCanBeJudged()

    AppendAchievementFindings_ReportsARefusalAsAnErrorAndStillJudgesTheRest()

    The failure the validator exists to survive: one achievement the rules cannot be run over must cost its own line, not everybody else's findings.

    Declaration
    public void AppendAchievementFindings_ReportsARefusalAsAnErrorAndStillJudgesTheRest()

    AppendProjectFindings_AFullyWiredProject_ReportsNothing()

    Declaration
    public void AppendProjectFindings_AFullyWiredProject_ReportsNothing()

    AppendProjectFindings_AchievementsWithNoSettingsAsset_IsAnErrorAnchoredToNothing()

    Declaration
    public void AppendProjectFindings_AchievementsWithNoSettingsAsset_IsAnErrorAnchoredToNothing()

    AppendProjectFindings_AnEnabledPlatformNobodyReaches_IsAWarningOnTheSettingsAsset()

    Declaration
    public void AppendProjectFindings_AnEnabledPlatformNobodyReaches_IsAWarningOnTheSettingsAsset()

    AppendProjectFindings_AnchorsEachFindingAtTheAssetItsAuthorWouldOpen()

    Declaration
    public void AppendProjectFindings_AnchorsEachFindingAtTheAssetItsAuthorWouldOpen()

    AppendProjectFindings_MoreThanOneSettingsAsset_IsAWarning()

    Declaration
    public void AppendProjectFindings_MoreThanOneSettingsAsset_IsAWarning()

    AppendProjectFindings_NoProfileInstallsTheModule_IsAnErrorAnchoredToTheBootTask()

    Declaration
    public void AppendProjectFindings_NoProfileInstallsTheModule_IsAnErrorAnchoredToTheBootTask()

    AppendSettingsAssetFindings_ARepeatedPlatform_IsAWarningOnThatAsset()

    Declaration
    public void AppendSettingsAssetFindings_ARepeatedPlatform_IsAWarningOnThatAsset()

    AppendSettingsAssetFindings_AnEmptySlot_IsAWarningOnThatAsset()

    Declaration
    public void AppendSettingsAssetFindings_AnEmptySlot_IsAWarningOnThatAsset()

    AppendSettingsAssetFindings_DistinctAssignedSlots_ReportNothing()

    Declaration
    public void AppendSettingsAssetFindings_DistinctAssignedSlots_ReportNothing()

    OneTimeTearDown()

    Declaration
    public void OneTimeTearDown()

    Run_MarksItselfAsHavingRunAndNeverThrows()

    Declaration
    public void Run_MarksItselfAsHavingRunAndNeverThrows()

    Run_ReportsADuplicateIdAsAnError()

    Declaration
    public void Run_ReportsADuplicateIdAsAnError()

    Run_ReportsAHiddenAchievementWithNoDescription()

    Declaration
    public void Run_ReportsAHiddenAchievementWithNoDescription()

    Run_ReportsAMissingIconOnTheAchievementThatHasNone()

    Declaration
    public void Run_ReportsAMissingIconOnTheAchievementThatHasNone()

    Run_ReportsAnAchievementsViewWhoseCancelTargetResolvesToNothing()

    Declaration
    public void Run_ReportsAnAchievementsViewWhoseCancelTargetResolvesToNothing()

    Run_ReportsAnEmptyPlatformSlotOnTheSettingsAssetThatCarriesIt()

    Declaration
    public void Run_ReportsAnEmptyPlatformSlotOnTheSettingsAssetThatCarriesIt()

    Run_ReportsAnUnauthoredConditionAsAnError()

    Declaration
    public void Run_ReportsAnUnauthoredConditionAsAnError()

    Run_SaysNothingAboutAnAchievementsViewThatReturnsNowhere()

    Declaration
    public void Run_SaysNothingAboutAnAchievementsViewThatReturnsNowhere()

    Run_SaysNothingAboutAnAchievementsViewWhoseCancelTargetResolves()

    The other half of the Cancel-target rule, and the only test that exercises the view-id resolver finding something: a target that another view definition really declares must go unreported.

    Declaration
    public void Run_SaysNothingAboutAnAchievementsViewWhoseCancelTargetResolves()

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

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