Namespace Serenity.UnityAchievements.Tests.Editor
Classes
AchievementAuthoringJudgeTests
EditMode tests for what the Studio and the project validator do when the authoring rules throw.
AchievementAuthoringReviewCacheTests
EditMode tests for when the shared authoring review is worth re-running. The rules themselves are not under test here — what is, is the one decision two tools used to make separately and could get wrong in opposite directions: running a project-wide scan on every repaint, or showing findings about an achievement the author already renamed.
AchievementAuthoringSectionGuiTests
EditMode tests for the two decisions AchievementAuthoringSectionGui makes before it draws anything: whether the unlock preview can run, and which kind of box a finding belongs in. The drawing itself is not under test — IMGUI is not a unit.
These moved off UnityAchievementDefinitionEditor when the sections were extracted, so the
inspector and the Achievements Studio's detail pane could stop answering them separately.
AchievementConditionNodeGuiTests
EditMode tests for the two decisions the condition tree drawer makes per node before it draws anything: what the node's header says, and whether the node has a complaint of its own worth showing. The drawing is not under test — IMGUI is not a unit.
AchievementConditionNodeWriterTests
EditMode tests for the writes the condition tree drawer makes. They go through a real UnityEditor.SerializedObject over a real achievement asset, because that round trip is the whole point of the drawer: an edit that skipped it would work in a test and lose undo, prefab overrides and repaints in the editor.
AchievementConditionTypeMenuTests
EditMode tests for the catalogue the condition tree drawer picks node types from. The dropdown itself is not under test — IMGUI is not a unit; what is testable, and what actually breaks, is the table behind it.
AchievementConditionTypeMenuTests.TestOnlyAttributedCondition
A project-authored condition, declaring its own category the way a project would.
AchievementConditionTypeMenuTests.TestOnlyUnattributedCondition
A project-authored condition that forgot to declare a category.
AchievementDefinitionAuthoringReviewTests
EditMode tests for AchievementDefinitionAuthoringReview: that the shared
authoring rules run against the achievement being edited, that the findings shown belong to
it and not to its neighbours, and that a second asset claiming the same id is reported here —
including through a real AssetDatabase scan, which is the only way the project-wide
duplicate check is exercised end to end.
AchievementDefinitionCreatorTests
EditMode tests for AchievementDefinitionCreator. Every fixture asset lives under a private
temp folder and every run passes RegisterAsAddressables = false, so the project's real achievements
and its Addressables settings are never touched. Mirrors AchievementSettingsCreatorTests.
Ids are prefixed pr11- and are slugs, because the duplicate-Id pass deliberately scans the WHOLE
project: a fixture id that collided with a shipped achievement would make an unrelated assertion fail.
AchievementEnabledPlatformScanTests
EditMode tests for AchievementEnabledPlatformScan and for what it turns on in AchievementDefinitionAuthoringReview: the platform rule is silent until the project's settings say which storefronts it ships on, and loud the moment they do.
AchievementGatewayScriptingDefineContractTests
Holds the three places a storefront's scripting define is written to the same string: the
#if that compiles its gateway, the constant its warning quotes, and the manifest the
SDK doctor offers to set.
AchievementInstallTaskReuseTests
Pins the wizard's install-task reuse contract against the task asset the project actually ships.
The shipped task invokes the per-module UnityAchievementsInstallationStep, not the legacy
UnitySerenityInstaller.InstallAchievements shape — a lookup that only knows the legacy shape
misses it and authors a duplicate beside it ("InstallAchievements 1"), which is exactly the
regression these tests exist to catch.
AchievementPlatformTableModelTests
EditMode tests for what the Studio's Platform Ids table shows and exports. The grid itself is not under test — IMGUI is not a unit; the decisions worth getting wrong are which columns are live in this project, which blank cell is a defect, and which achievement is too broken to publish, plus the mapping that hands each of them to the manifest exporter.
AchievementSdkInspectorTests
EditMode tests for AchievementSdkInspector: that every point of the install-then-define transaction is reported for what it is, that a define set without its SDK is called out as the compile-breaking state it is, and that the doctor cannot fetch anything.
AchievementSettingsCreatorTests
EditMode tests for AchievementSettingsCreator. Every test targets fixture assets under a
private temp folder via Input.SettingsAssetPath, so the project's real achievements configuration
is never touched. Mirrors Serenity.GameSave.Tests.Editor.Builder.GameSaveCreatorTests.
Deliberately never sets Input.RetrofitThemes to true: that path calls
AchievementsThemeRetrofitter.RetrofitAllThemesMissingAchievements, which scans every
UnityUiThemeDefinition in the whole project — exercising it here would retrofit the real shipped
themes as a side effect of running the test suite, exactly as AchievementsThemeRetrofitterTests
documents for the same reason. Only the not-requested path is asserted here; the retrofit itself is
covered by that suite.
AchievementWizardSummaryTests
EditMode tests for AchievementWizardSummary, the review step of
CreateAchievementSettingsWindow. The window itself is not tested — IMGUI windows are not, by
convention — which is exactly why the one part of a review step that can silently lie to a reader (a
line naming a path the creator will not actually write, or a boot task it will not actually wire) was
extracted into a pure type. Nothing in this fixture touches the asset database.
AchievementWizardViewDefaultsTests
EditMode tests for AchievementWizardViewDefaults and
AchievementWizardPlatformSelection — the two decisions
CreateAchievementSettingsWindow's steps make before any asset exists, both kept free of
AssetDatabase so they can be asserted without an IMGUI pass.
AchievementsStudioFilterTests
EditMode tests for the Achievements Studio's search and category filter — the two controls that decide which achievements an author can see at all, and so the two that can hide the one they are looking for.
AchievementsStudioRowModelTests
EditMode tests for the row the Achievements Studio's list draws. The drawing is not under test — IMGUI is not a unit; what is testable, and what actually decides whether a row is readable, is the reduction from an achievement plus its findings to the badges, the coverage and the severity dot.
AchievementsStudioSelectionTests
EditMode tests for the Achievements Studio's selection rules: which achievement stays selected when the list is narrowed, rebuilt or emptied, and where the arrow keys go.
SerenityAchievementValidatorTests
EditMode tests for SerenityAchievementValidator.