Class AchievementServiceTests
Behavioral tests for AchievementService over an in-memory store and a
scriptable platform gateway: unlock idempotency, the points mirror, hidden visibility,
progress clamping and auto-unlock, platform push throttling, reconciliation in both
directions, the detached screenshot attachment, and reset.
Inheritance
AchievementServiceTests
Assembly: Tests.dll
Syntax
public class AchievementServiceTests
Constructors
AchievementServiceTests()
Declaration
public AchievementServiceTests()
Methods
CallsAfterDispose_WarnOnceRatherThanOncePerCall()
Declaration
public Task CallsAfterDispose_WarnOnceRatherThanOncePerCall()
Returns
Ctor_NullDefinitions_Throws()
Declaration
public void Ctor_NullDefinitions_Throws()
Ctor_NullIdentity_Throws()
Declaration
public void Ctor_NullIdentity_Throws()
Declaration
public void Ctor_NullPlatformSync_Throws()
Ctor_NullPointsMirror_Throws()
Declaration
public void Ctor_NullPointsMirror_Throws()
Ctor_NullRegistry_Throws()
Declaration
public void Ctor_NullRegistry_Throws()
Ctor_NullScreenshotAttachment_Throws()
Declaration
public void Ctor_NullScreenshotAttachment_Throws()
Ctor_NullSessionGeneration_Throws()
Declaration
public void Ctor_NullSessionGeneration_Throws()
Ctor_NullSettings_Throws()
Declaration
public void Ctor_NullSettings_Throws()
Ctor_NullStore_Throws()
Declaration
public void Ctor_NullStore_Throws()
Dispose_CancelsAScreenshotCaptureStillInFlight()
Declaration
public Task Dispose_CancelsAScreenshotCaptureStillInFlight()
Returns
Dispose_TwiceInARow_IsSafe()
Declaration
public void Dispose_TwiceInARow_IsSafe()
Dispose_WhileACaptureIsStarting_DoesNotThrow()
Declaration
public Task Dispose_WhileACaptureIsStarting_DoesNotThrow()
Returns
GetAll_IsOrderedByDisplayOrder()
Declaration
public void GetAll_IsOrderedByDisplayOrder()
GetTotalPoints_SumsTheUnlockedRecordsOnly()
Declaration
public Task GetTotalPoints_SumsTheUnlockedRecordsOnly()
Returns
GetVisible_HidesAHiddenAchievementUntilItIsUnlocked()
Declaration
public Task GetVisible_HidesAHiddenAchievementUntilItIsUnlocked()
Returns
IdentityChangedAfterLoad_KeepsWritingAsTheLoadedPlayerAndWarnsOnce()
Declaration
public Task IdentityChangedAfterLoad_KeepsWritingAsTheLoadedPlayerAndWarnsOnce()
Returns
IncrementProgressAsync_AddsToTheStoredNumerator()
Declaration
public Task IncrementProgressAsync_AddsToTheStoredNumerator()
Returns
IncrementProgressAsync_AfterAutoUnlock_IsANoOp()
Declaration
public Task IncrementProgressAsync_AfterAutoUnlock_IsANoOp()
Returns
LoadAsync_AfterAnIdentityChange_SwitchesAccounts()
Declaration
public Task LoadAsync_AfterAnIdentityChange_SwitchesAccounts()
Returns
LoadAsync_HydratedUnlocks_AreNotMirroredIntoScoreAgain()
Declaration
public Task LoadAsync_HydratedUnlocks_AreNotMirroredIntoScoreAgain()
Returns
LoadAsync_HydratesTheCacheFromTheStore()
Declaration
public Task LoadAsync_HydratesTheCacheFromTheStore()
Returns
Declaration
public Task LoadAsync_LocalOnlyUnlock_IsPushedToThePlatform()
Returns
Declaration
public Task LoadAsync_PlatformOnlyUnlock_IsMirroredLocallyWithoutASignal()
Returns
Declaration
public Task LoadAsync_PlatformOnlyUnlock_SignalsWhenTheProjectOptedIn()
Returns
LoadAsync_ReconciledUnlocks_AreNotMirroredIntoScore()
Declaration
public Task LoadAsync_ReconciledUnlocks_AreNotMirroredIntoScore()
Returns
Declaration
public Task LoadAsync_UnavailablePlatform_StillHydratesTheCache()
Returns
ReadsBeforeLoad_WarnOnceAndReportEverythingLocked()
Declaration
public void ReadsBeforeLoad_WarnOnceAndReportEverythingLocked()
ResetAllAsync_AfterDispose_IsANoOpRatherThanAFailure()
Declaration
public Task ResetAllAsync_AfterDispose_IsANoOpRatherThanAFailure()
Returns
ResetAllAsync_ClearsEveryLocalStore()
Declaration
public Task ResetAllAsync_ClearsEveryLocalStore()
Returns
Declaration
public Task ResetAllAsync_ClearsThePlatformWhenTheProjectOptedIn()
Returns
Declaration
public Task ResetAllAsync_LeavesThePlatformAloneByDefault()
Returns
ResetAllAsync_ReturnsTheMirroredScoreMetricToZero()
Declaration
public Task ResetAllAsync_ReturnsTheMirroredScoreMetricToZero()
Returns
Declaration
public Task RetryPlatformSyncAsync_PushesWhatTheOfflineLoadCouldNot()
Returns
Declaration
public Task RetryPlatformSyncAsync_StillOffline_IsAHarmlessNoOp()
Returns
SetProgressAsync_AboveTheTarget_ClampsRatherThanOvershooting()
Declaration
public Task SetProgressAsync_AboveTheTarget_ClampsRatherThanOvershooting()
Returns
SetProgressAsync_ClampsToTheTargetAndDispatchesTheChange()
Declaration
public Task SetProgressAsync_ClampsToTheTargetAndDispatchesTheChange()
Returns
SetProgressAsync_ExactStepBoundaries_PushOnce()
Declaration
public Task SetProgressAsync_ExactStepBoundaries_PushOnce()
Returns
SetProgressAsync_JumpingStraightToComplete_PushesProgressOnce()
Declaration
public Task SetProgressAsync_JumpingStraightToComplete_PushesProgressOnce()
Returns
SetProgressAsync_NegativeFromANonZeroBaseline_ClampsToZeroAndDispatches()
Declaration
public Task SetProgressAsync_NegativeFromANonZeroBaseline_ClampsToZeroAndDispatches()
Returns
SetProgressAsync_OnABooleanAchievement_WarnsAndChangesNothing()
Declaration
public Task SetProgressAsync_OnABooleanAchievement_WarnsAndChangesNothing()
Returns
Declaration
public Task SetProgressAsync_PushesToThePlatformOnlyWhenItCrossesTheStep()
Returns
SetProgressAsync_ReachingTheTarget_AutoUnlocks()
Declaration
public Task SetProgressAsync_ReachingTheTarget_AutoUnlocks()
Returns
SetProgressAsync_UnchangedValue_WritesNothing()
Declaration
public Task SetProgressAsync_UnchangedValue_WritesNothing()
Returns
SetProgressAsync_ZeroStepPercent_PushesEveryChange()
Declaration
public Task SetProgressAsync_ZeroStepPercent_PushesEveryChange()
Returns
UnlockAsync_AfterDispose_IsANoOpRatherThanAFailure()
Declaration
public Task UnlockAsync_AfterDispose_IsANoOpRatherThanAFailure()
Returns
UnlockAsync_DispatchesTheUnlockedSignal()
Declaration
public Task UnlockAsync_DispatchesTheUnlockedSignal()
Returns
UnlockAsync_FailedCapture_LeavesTheUnlockIntact()
Declaration
public Task UnlockAsync_FailedCapture_LeavesTheUnlockIntact()
Returns
UnlockAsync_MarksTheAchievementUnlockedAndRecordsIt()
Declaration
public Task UnlockAsync_MarksTheAchievementUnlockedAndRecordsIt()
Returns
Declaration
public Task UnlockAsync_PlatformPush_PreservesTheUnlockDate()
Returns
Declaration
public Task UnlockAsync_PlatformRefuses_LeavesTheRecordQueuedWithoutThrowing()
Returns
Declaration
public Task UnlockAsync_PushesToThePlatformAndMarksTheRecordSynced()
Returns
UnlockAsync_Twice_WritesOnlyOnce()
Declaration
public Task UnlockAsync_Twice_WritesOnlyOnce()
Returns
UnlockAsync_UnknownAchievement_WarnsOnceAndChangesNothing()
Declaration
public Task UnlockAsync_UnknownAchievement_WarnsOnceAndChangesNothing()
Returns
UnlockAsync_WithBlankPointsScoreKey_NeverTouchesScore()
Declaration
public Task UnlockAsync_WithBlankPointsScoreKey_NeverTouchesScore()
Returns
UnlockAsync_WithPointsScoreKey_MirrorsThePointsIntoScore()
Declaration
public Task UnlockAsync_WithPointsScoreKey_MirrorsThePointsIntoScore()
Returns
UnlockAsync_WithScreenshotsOff_NeverCaptures()
Declaration
public Task UnlockAsync_WithScreenshotsOff_NeverCaptures()
Returns
UnlockAsync_WithScreenshotsOn_AttachesTheKeyAndSignalsIt()
Declaration
public Task UnlockAsync_WithScreenshotsOn_AttachesTheKeyAndSignalsIt()
Returns
UnlockAsync_ZeroPointAchievement_CountsAsUnlockedWithoutTouchingScore()
Declaration
public Task UnlockAsync_ZeroPointAchievement_CountsAsUnlockedWithoutTouchingScore()
Returns