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.
AchievementOptionsAuthoringTests
AchievementOptionsAuthoring re-declares every option of the module's default configuration so a wizard run can edit them; a default added to AchievementSettingsDefaults but not mirrored there is silently dropped on the way to the asset, so each constant is followed from the authoring field to the written asset field.
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.
AchievementSyncApplyConsequencesTests
EditMode tests for what the Apply confirmation names beyond "N changes": the achievements that adopt keys, the icon files written and replaced, and the existing string table entries that get different text.
AchievementSyncApplyFlowTests
EditMode tests for applying a pull that waits for icon downloads: it applies exactly the plan and the accepted rows it was confirmed for, and otherwise cancels and applies nothing.
AchievementSyncAssetTestBase
The private temp folder, the authored fixture assets and the Addressables clean-up every test that
applies a sync plan to real assets needs. Every fixture asset lives under a folder named after the
concrete test class, and creations pass RegisterAsAddressables = false, mirroring
AchievementDefinitionCreatorTests.
AchievementSyncAssetWriterTests
EditMode tests for AchievementSyncAssetWriter: applying — or previewing — a sync plan's
accepted Pull-direction changes. Every fixture asset lives under a private temp folder and every run
passes RegisterAsAddressables = false for creations, mirroring AchievementDefinitionCreatorTests.
AchievementSyncConnectStepGuiTests
The Connect step's app id commit, its signed-in banner and its method and transport choices: what the author sees and what the step asks the window to do, drawn through a full IMGUI frame on an in-memory session.
AchievementSyncConnectorCatalogTests
EditMode tests for AchievementSyncConnectorCatalog: a storefront is wired exactly when a connector source claims it, the session reaches that source, and two sources for one storefront are refused by name.
AchievementSyncConnectorSourceContextTests
EditMode tests for AchievementSyncConnectorSourceContext: it carries the window's editor session state to a provider, and refuses to exist without one.
AchievementSyncConnectorSourceProviderFailureTests
EditMode tests pinning that a faulty connector source provider fails fast: neither its construction nor its CreateSource(AchievementSyncConnectorSourceContext) failure is swallowed, so the window does not compose with a storefront silently missing.
AchievementSyncConnectorSourceProvidersTests
EditMode tests for Serenity.Achievements.Infrastructure.Editor.Sync.AchievementSyncConnectorSourceProviders: providers are found by type outside the test assemblies, built only when publicly constructible without arguments, and every provider is handed the window's context and must answer with a source.
AchievementSyncCopilotBundleExporterTests
Tests for Serenity.Achievements.Infrastructure.Editor.Sync.AchievementSyncCopilotBundleExporter.IsInsideProjectAssets(System.String) — the pure guard that stops the Copilot bundle export from dropping untracked, unregistered files under the project's Assets folder (the exporter deliberately bypasses AssetDatabase).
AchievementSyncEditorCompositionTests
A test that forgets to hand the Achievement Platform Sync window services must fail loudly instead of quietly composing the real editor session state — the original way a test wiped an author's live sign-in.
AchievementSyncFlowTests
The pull and push flows the Achievement Platform Sync window delegates to: what they put on the session and which step an outcome sends the wizard to, driven by a connector whose tasks are already complete.
AchievementSyncIconSizeLimitTests
EditMode tests for the size a pulled icon may declare: a small file whose header claims enormous dimensions is refused by the download check and by the file writer, before a decoder is asked to allocate for it.
AchievementSyncKeyAdoptionTests
EditMode tests for the key adoption of a matched achievement that holds literal text: the text it holds today becomes the authoring locale's entry under the convention keys, the accepted languages follow, and the definition switches to the keys — only when the author accepted that achievement's adoption row.
AchievementSyncKeyCollisionApplyTests
EditMode tests for two achievements that would file their text under the same localization key: neither is created or moved into the string table, a preview says what the apply does, and a creation never points at text it did not write.
AchievementSyncLocalSnapshotSourceTests
EditMode tests for AchievementSyncLocalSnapshotSource. Every fixture is an in-memory
UnityAchievementDefinition built via ScriptableObject.CreateInstance rather than a
project asset: the source only reads the given definitions, so nothing here needs to reach the
UnityEditor.AssetDatabase or the project's Addressables settings.
AchievementSyncLocaleCreatorTests
EditMode tests for Serenity.Achievements.Infrastructure.Editor.Sync.AchievementSyncLocaleCreator: adding a language the storefront has to the project — the locale first, then the collection's table for it — and what it reports when a step cannot be done. The real Localization round trip is tested in the Localization test assembly.
AchievementSyncManifestBackupTests
The pre-apply backup promise: when the author asked for one, the answer says whether it exists, so an apply never proceeds without the safety copy that was requested.
AchievementSyncPlanFilterTests
EditMode tests for AchievementSyncPlanFilter: chip category matching, text search, and
the counts the Review step's chip bar shows. Mirrors AchievementsStudioFilter's testing style.
AchievementSyncPulledIconTests
EditMode tests for the icons a pull brings in: where the file goes and what it is called, what is imported and registered, what is never overwritten, that a preview asks for nothing and writes nothing yet reports what an apply reports, and that one failed icon is one reported row.
AchievementSyncPushRefusalTests
EditMode tests for the guard that stands in front of a push: a walkthrough by hand is checked like a send over the storefront's API, and the answer is worked out once per plan, not on every repaint.
AchievementSyncReviewListLayoutTests
The Review list gives an achievement's id room to be read. A list row hands the title less than half of its width and the badges the rest, so the pane the list starts in decides whether a long id is cut short.
AchievementSyncServicesCompositionTests
EditMode tests for Serenity.Achievements.Infrastructure.Editor.Sync.AchievementSyncServices.Compose(Serenity.Global.Infrastructure.Editor.IEditorSessionStateStore,System.Collections.Generic.IEnumerable{Serenity.Achievements.Infrastructure.Editor.Sync.IAchievementSyncConnectorSourceProvider}): the connector catalog is built from whatever providers are handed in, each provider works from the window's own session state, and the trace settings the window shows are the ones the Steam connector traces through. Every test runs on an in-memory session state.
AchievementSyncSessionLifecycleTests
Unity calls a window's OnDisable on every script recompile and Play Mode entry, not only when the
window closes — so a live sign-in must survive that, be forgotten when the window really closes, and the
connection identity (app id, storefront, transport) must come back with it.
AchievementSyncSnapshotExportFlowTests
The Connect step's "save the pulled snapshot" action: the file it writes must be one the snapshot-file connector reads straight back, and it must never land inside the project's Assets folder.
AchievementSyncStagedConfirmationTests
EditMode tests for Serenity.Achievements.Infrastructure.Editor.Sync.AchievementSyncStagedConfirmation: staging records the scope it was requested for, confirming runs the action once, and a changed scope drops the staged box.
AchievementSyncSteamInterfaceSeamTests
EditMode tests pinning that the Achievement Platform Sync wizard reaches Steam only through ISteamPartnerSession, ISteamAchievementConnectorFactory and ISteamPartnerSignInClientFactory: fakes handed in at the composition edge are what the connector catalog (through the Steam connector source), the services and the session lifecycle use.
AchievementSyncSteamSignInFlowTests
The Steam QR sign-in flow, driven tick by tick against a scripted Steam, a scripted minter and a clock the test moves by hand. A scripted call answers with an already complete task, so a tick that starts a call is followed by one that handles its answer; a test that needs a call still in flight asks the scripted Steam or minter to hold its answers and completes the held task by hand.
AchievementSyncSteamSignInPacingTests
Tests for Serenity.Achievements.Infrastructure.Editor.Sync.AchievementSyncSteamSignInPacing: the poll schedule, the backoff and the restart budget.
AchievementSyncStepGuiDrawTests
The Achievement Platform Sync steps that take the window's services draw a full IMGUI frame on an in-memory editor session state: the wiring from the window's collaborators down to each control holds, a draw changes no session value, and a typed credential lands in the injected store and nowhere else.
AchievementSyncStorefrontCopyMarkTests
EditMode tests for the mark that says an icon file is the storefront's own copy: it is believed only while the file is as it was saved, and a push builds its payload from it so the copy is not sent back.
AchievementSyncTranslatedCreationTests
EditMode tests for what a pull does with an achievement that only exists on the storefront: created as a translating definition with one string table entry per accepted language when the Scope step's collection can take them, and as a literal one — with a notice — when it cannot.
AchievementSyncTranslatedPullEndToEndTests
A whole pull, end to end through the snapshot-file connector: a storefront snapshot holding three languages for three achievements (one new, one literal, one already translating) is read from a file, planned against a collection that has two of the three languages, completed by adding the third, and applied — and the project ends up with every achievement translating and every text filed.
AchievementSyncWindowConfirmationTests
The Achievement Platform Sync wizard's two consequential actions — pushing to Steam and writing accepted changes into the project — wait for an explicit confirmation held in the window itself, never in a native dialog. Requesting the action stages the confirmation; nothing runs until it is confirmed.
AchievementSyncWindowConnectResultTests
What the window does with the requests the Connect step reports: when it carries them out and which sign-in or pull each one moves.
AchievementSyncWindowSignOutTests
Signing out from the Connect step forgets everything the author signed in with, through the window.
AchievementSyncWizardSessionTests
EditMode tests for AchievementSyncWizardSteps and AchievementSyncWizardSession:
step availability judged purely from session state, no IMGUI involved. Mirrors
AchievementWizardSummaryTests's pure-model-only testing style for a stepped wizard.
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.
AchievementsSteamworksAssemblyReferenceTests
The achievements runtime assembly must reference the Steamworks.NET assembly, or the Steam gateway cannot compile once the SDK doctor's install route has put the package in a customer project. The reference is supposed to be unresolved in this repository, which does not carry Steamworks.NET: a GUID that points at nothing is skipped silently while the package is absent and bound as soon as it arrives. A sweep that removes "dangling" references breaks the install route without any test noticing, so this compares the assembly definition against the one GUID the SDK manifest declares.
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.
CreateAchievementSettingsWindowRealRunDriver
Runs CreateAchievementSettingsWindow for real: a fresh window pointed at the fixture folder, the
way CreateAchievementSettingsWindowResultTests points it at its own, creates its settings and backend
there. Unshown, so the Summary's view-creation default (applied only when that step draws) stays off and the
run writes nothing outside the folder.
CreateAchievementSettingsWindowResultTests
A failed primary action is what Serenity.Achievements.Infrastructure.Editor.Builder.CreateAchievementSettingsWindow.LastResultForTests reports afterwards, never the result of an earlier successful run, so the Summary step's result panel always reflects the run that just finished.
CreateAchievementSettingsWindowStorefrontStepTests
A storefront field that blocks Create is the Storefronts step's own error — the wizard's error path, saying it blocks Create — while a storefront finding that does not block stays a warning and never holds the step.
CreateAchievementSettingsWindowViewStepTests
W5C-8: a required target missing on a step is that step's own error, as in every other wizard — so wiring a menu option with no Target Menu blocks Next on the View step instead of only being caught at Summary.
FileAchievementDefinitionSyncConnectorTests
EditMode tests for FileAchievementDefinitionSyncConnector. Every fixture reads from a real temp file on disk — never a project asset — so nothing here touches the AssetDatabase.
QrCodeTextureRendererTests
Tests for Serenity.Achievements.Infrastructure.Editor.Sync.QrCodeTextureRenderer: size, colours, row order and how the texture is kept.
SerenityAchievementValidatorTests
EditMode tests for SerenityAchievementValidator.
SteamAchievementConnectorFactoryTests
EditMode tests for Serenity.Achievements.Infrastructure.Editor.Sync.Steam.SteamAchievementConnectorFactory: the clients it builds send every request through the wire-trace decorator, and honor the switch on every request.
SteamIconDownloaderRealClientTests
Sends an icon download through the REAL shared HttpClient of the client: the downloader builds the request, the client's own icon send puts it on the wire, and the only thing replaced is the address, so a loopback listener can stand in for the content network. The sign-in values are dummies.
SteamIconDownloaderTests
EditMode tests for Serenity.Achievements.Infrastructure.Editor.Sync.Steam.SteamIconDownloader, the one request of the sync that leaves the partner site: it carries no cookie, refuses every address off Steam's static-content network, follows no redirect, caps the body, accepts only bytes that decode as an image, and never throws.
SteamIconPngEncoderTests
EditMode tests for SteamIconPngEncoder. Every sprite is built in memory via
Sprite.Create over a fresh Texture2D rather than imported as an asset — the encoder blits
through a UnityEngine.RenderTexture rather than reading the source texture directly, so it never needs
the source to be Read/Write enabled or to exist on disk. Pixel assertions allow a small tolerance because
the value crosses a GPU blit, which a byte-for-byte assertion would make brittle to color-space settings.
SteamPartnerClientTests
EditMode tests for Serenity.Achievements.Infrastructure.Editor.Sync.Steam.SteamPartnerClient. Every fixture injects the HTTP send through the internal test seam — nothing here touches a real socket.
SteamPushPumpTests
EditMode tests for Serenity.Achievements.Infrastructure.Editor.Sync.Steam.SteamPushPump. Every fixture injects the HTTP send through the test seam — nothing here touches a real socket — and injects the inter-request delay so no test actually waits.