logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class FileKeyValueStoreTests

    Behavioral tests for FileKeyValueStore: round-trip get/set, missing-key semantics, key sanitization (deterministic, injective, root-escape-proof), and the never-throw health check contract.

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

    Constructors

    FileKeyValueStoreTests()

    Declaration
    public FileKeyValueStoreTests()

    Methods

    Ctor_NullBlobStore_ThrowsArgumentNullException()

    Declaration
    public void Ctor_NullBlobStore_ThrowsArgumentNullException()

    Ctor_WhitespaceNamespace_DefaultsToFileKeyValue()

    Declaration
    public void Ctor_WhitespaceNamespace_DefaultsToFileKeyValue()

    Ctor_WhitespaceRootDirectory_ThrowsArgumentException()

    Declaration
    public void Ctor_WhitespaceRootDirectory_ThrowsArgumentException()

    DeleteAsync_RemovesStoredValue()

    Declaration
    public Task DeleteAsync_RemovesStoredValue()
    Returns
    Type Description
    Task

    ExistsAsync_AfterSet_ReturnsTrue()

    Declaration
    public Task ExistsAsync_AfterSet_ReturnsTrue()
    Returns
    Type Description
    Task

    ExistsAsync_MissingKey_ReturnsFalse()

    Declaration
    public Task ExistsAsync_MissingKey_ReturnsFalse()
    Returns
    Type Description
    Task

    GetAsync_EmptyKey_ThrowsArgumentException()

    Declaration
    public Task GetAsync_EmptyKey_ThrowsArgumentException()
    Returns
    Type Description
    Task

    GetAsync_ExistingCorruptEntry_PropagatesReadFailure()

    Declaration
    public Task GetAsync_ExistingCorruptEntry_PropagatesReadFailure()
    Returns
    Type Description
    Task

    GetAsync_MissingKey_ReturnsNull()

    Declaration
    public Task GetAsync_MissingKey_ReturnsNull()
    Returns
    Type Description
    Task

    HealthCheckAsync_HealthyBlobStore_ReturnsTrue()

    Declaration
    public Task HealthCheckAsync_HealthyBlobStore_ReturnsTrue()
    Returns
    Type Description
    Task

    HealthCheckAsync_ThrowingBlobStore_ReturnsFalseInsteadOfThrowing()

    Declaration
    public Task HealthCheckAsync_ThrowingBlobStore_ReturnsFalseInsteadOfThrowing()
    Returns
    Type Description
    Task

    SanitizeKey_TwoKeysThatWouldCollideUnderNaiveStripping_MapToDifferentPaths()

    Declaration
    public Task SanitizeKey_TwoKeysThatWouldCollideUnderNaiveStripping_MapToDifferentPaths()
    Returns
    Type Description
    Task

    SanitizedPath_DotIsEncoded_SoTraversalSegmentCannotForm()

    Declaration
    public Task SanitizedPath_DotIsEncoded_SoTraversalSegmentCannotForm()
    Returns
    Type Description
    Task

    SanitizedPath_KeysDifferingOnlyInCase_MapToPathsDistinctEvenCaseInsensitively()

    Declaration
    public Task SanitizedPath_KeysDifferingOnlyInCase_MapToPathsDistinctEvenCaseInsensitively()
    Returns
    Type Description
    Task

    SanitizedPath_PercentEncodesUnsafeCharactersAndAppendsSegmentHash()

    Declaration
    public Task SanitizedPath_PercentEncodesUnsafeCharactersAndAppendsSegmentHash()
    Returns
    Type Description
    Task

    SanitizedPath_ReservedDeviceNameKey_DoesNotProduceReservedBasename()

    Declaration
    public Task SanitizedPath_ReservedDeviceNameKey_DoesNotProduceReservedBasename()
    Returns
    Type Description
    Task

    SanitizedPath_SameKeyAcrossStoreInstances_MapsToSamePath()

    Declaration
    public Task SanitizedPath_SameKeyAcrossStoreInstances_MapsToSamePath()
    Returns
    Type Description
    Task

    SanitizedPath_SlashBecomesDirectorySeparator_EachSegmentHashedIndependently()

    Declaration
    public Task SanitizedPath_SlashBecomesDirectorySeparator_EachSegmentHashedIndependently()
    Returns
    Type Description
    Task

    SanitizedPath_VeryLongKey_ProducesBoundedFilenameAndRoundTrips()

    Declaration
    public Task SanitizedPath_VeryLongKey_ProducesBoundedFilenameAndRoundTrips()
    Returns
    Type Description
    Task

    SetAsync_EmptyKey_ThrowsArgumentException()

    Declaration
    public Task SetAsync_EmptyKey_ThrowsArgumentException()
    Returns
    Type Description
    Task

    SetAsync_ExistingKey_OverwritesPreviousValue()

    Declaration
    public Task SetAsync_ExistingKey_OverwritesPreviousValue()
    Returns
    Type Description
    Task

    SetAsync_KeyWithSlash_IsRecoverableViaGetAsync()

    Declaration
    public Task SetAsync_KeyWithSlash_IsRecoverableViaGetAsync()
    Returns
    Type Description
    Task

    SetAsync_KeyWithUnsafeCharacters_IsRecoverableViaGetAsync()

    Declaration
    public Task SetAsync_KeyWithUnsafeCharacters_IsRecoverableViaGetAsync()
    Returns
    Type Description
    Task

    SetAsync_NullKey_ThrowsArgumentException()

    Declaration
    public Task SetAsync_NullKey_ThrowsArgumentException()
    Returns
    Type Description
    Task

    SetAsync_ThenGetAsync_RoundTripsExactBytes()

    Declaration
    public Task SetAsync_ThenGetAsync_RoundTripsExactBytes()
    Returns
    Type Description
    Task
    In this article
    © 2026 Serenity. All Rights Reserved