logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementScreenshotKeyTests

    Pins the layout, the escaping and — above all — the parsing of the key an unlock record persists.

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

    The key travels between machines inside a save file a player can edit, and it is turned straight into a file path. The rejection cases below are the security surface: every one of them is a key that, if followed, would read or delete a file outside the player's screenshot folder. The escaping cases are the correctness surface: a lossy escape lets two players share one folder, so a reset for one wipes the other.

    Constructors

    AchievementScreenshotKeyTests()

    Declaration
    public AchievementScreenshotKeyTests()

    Methods

    BelongsTo_KeyOfAPlayerWhoseNameIsAPrefix_IsRejected()

    Declaration
    public void BelongsTo_KeyOfAPlayerWhoseNameIsAPrefix_IsRejected()

    Escaping_IsCollisionFree_AcrossCharactersThatWouldFoldTogether()

    Declaration
    public void Escaping_IsCollisionFree_AcrossCharactersThatWouldFoldTogether()

    ForUnlock_IdentifierWithSeparators_KeepsTheKeyInsideThePlayerFolder()

    Declaration
    public void ForUnlock_IdentifierWithSeparators_KeepsTheKeyInsideThePlayerFolder()

    ForUnlock_PlainIdentifiers_BuildsThePlayerFoldedPngKey()

    Declaration
    public void ForUnlock_PlainIdentifiers_BuildsThePlayerFoldedPngKey()

    IndexFor_BuildsTheIndexInsideThePlayerFolder()

    Declaration
    public void IndexFor_BuildsTheIndexInsideThePlayerFolder()

    IsWithinRoot_KeyResolvedUnderTheAnchor_IsAccepted()

    Declaration
    public void IsWithinRoot_KeyResolvedUnderTheAnchor_IsAccepted()

    IsWithinRoot_KeyThatEscapesTheAnchor_IsRefused(string, string)

    Declaration
    public void IsWithinRoot_KeyThatEscapesTheAnchor_IsRefused(string rootDirectory, string resolvedKey)
    Parameters
    Type Name Description
    string rootDirectory
    string resolvedKey

    Resolve_WithRootDirectory_AnchorsTheKeyUnderItExactlyOnce()

    Declaration
    public void Resolve_WithRootDirectory_AnchorsTheKeyUnderItExactlyOnce()

    Resolve_WithoutRootDirectory_LeavesTheKeyUntouched()

    Declaration
    public void Resolve_WithoutRootDirectory_LeavesTheKeyUntouched()

    TryParse_IndexKey_IsNotAScreenshotKey()

    Declaration
    public void TryParse_IndexKey_IsNotAScreenshotKey()

    TryParse_KeyThisTypeCouldNotHaveWritten_IsRefused(string)

    Declaration
    public void TryParse_KeyThisTypeCouldNotHaveWritten_IsRefused(string storageKey)
    Parameters
    Type Name Description
    string storageKey

    TryParse_KeyThisTypeWrote_RoundTripsTheIdentifiersItWasBuiltFrom()

    Declaration
    public void TryParse_KeyThisTypeWrote_RoundTripsTheIdentifiersItWasBuiltFrom()

    TryParse_OverlongSegment_IsRefused()

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