Namespace Serenity.Achievements.Tests.Fakes
Classes
AchievementConditionContexts
Builds the evaluation contexts every condition suite needs, so no test spells one out.
AchievementServiceHarness
Assembles an AchievementService over the module's fakes and exposes every one of them, so a test states only the switch it cares about. Settings are read live by the service and its collaborators, so a test may flip one after the harness is built.
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.
CustomRuleTestAchievementCondition
A condition outside CustomCondition that still validates a rule type through
ValidateCustomRule(IAchievementCustomConditionResolver) — proof that
AchievementAuthoringRules validates
whatever overrides that member, not only that one concrete type.
DescribingTestAchievementCondition
A condition outside the ten authored node types, whose Describe(bool) override reads nothing like its DisplayName — proof that AchievementConditionSummary dispatches to a node's own phrasing polymorphically instead of falling back to the display name for every type it does not know by name.
EnemyKilledTestSignal
A signal a test game dispatches when an enemy dies.
EnteredBackRoomTestSignal
A signal a test game dispatches when the player enters the back room.
FailableAchievementStore
Decorates an IAchievementStore so a test can make it fail on demand — the way a remote backend fails: by throwing, not by returning a flag.
FakeAchievementCustomConditionResolver
A resolver a test loads by hand, so no reflection is involved.
FakeAchievementPlatformGateway
Scriptable IAchievementPlatformGateway used for tests: an in-memory unlocked set, a switchable availability flag, and a one-shot failure so the offline-retry and never-throw paths can be exercised without a real storefront SDK.
FakeAchievementPlayerIdentityProvider
Fixed-identity IAchievementPlayerIdentityProvider used for tests.
FakeAchievementScreenshotCapturer
Scriptable IAchievementScreenshotCapturer used for tests: hands back a fixed byte payload, null to exercise the capture-failed path, or — when held — a capture that stays pending until the test releases it, which is what makes the "reset while a capture is in flight" window reachable.
FakeAchievementSettings
Mutable IAchievementSettings used for tests, defaulted to the shipped values so a test only states the switch it actually cares about. The service reads it live, so a test may flip a switch after the service is built.
InMemoryAchievementScreenshotStore
In-memory IAchievementScreenshotStore used for tests. Hands back the same folder-shaped key the blob-backed store does, so assertions can check the key the unlock record ends up carrying.
InMemoryAchievementStore
In-memory IAchievementStore used for tests. Honors the port's upsert-if-newer
contract: a write carrying a revision at or below the stored row is discarded, exactly as a
structured backend's UpsertIfBetterAsync would discard it.
LeftBackRoomTestSignal
A signal a test game dispatches when the player leaves the back room.
PlayerDetectedTestSignal
A signal a test game dispatches when a guard spots the player.
RecordingAchievementService
An IAchievementService that records what was asked of it and answers from a dictionary, so a suite can assert exactly how many writes an evaluation produced.
SignalCountingTestAchievementCondition
A condition met once a signal of the authored type has been dispatched a given number of
times — the engine-free stand-in for SignalReceivedCondition that a Business suite
drives when what it is testing is the evaluator, the index or the subscription binder rather
than the leaf's own parsing of a signal type name.
SingleChildTestAchievementCondition
A condition that wraps exactly one other, the way DurationCondition and
NotCondition wrap theirs: it bubbles its child's validation, and — since it always
asks to be ticked — accumulates how many seconds its child has held met, so a suite can prove
a reset clears a tally that lives one level below the tree it directly holds.
StructuralTestAchievementCondition
A condition outside the two structural base classes that still reports children through
Children — proof that AchievementConditionTree
walks whatever overrides the property, not only CompositeAchievementCondition
and SingleChildAchievementCondition.
StubAchievementCondition
A condition a test drives by hand: it reports whatever the test set, and counts how often it was asked, so a suite can prove a composite really did evaluate every child.
StubCustomCondition
A project-supplied rule, as a test writes one.
ThrowingAchievementCondition
A condition that fails the way project code in a custom rule can: by throwing. Used to prove that one broken achievement does not stop the others being evaluated.