logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardValueFormatterTests

    EditMode tests for LeaderboardValueFormatter. Pure formatting logic, so every case runs without an editor/player context.
    Rounding-boundary cases deliberately use values whose fractional part is exactly representable in binary (e.g. 0.5, 12.25, 12.125) rather than decimal-looking values like 0.995 -- those are NOT exact as doubles, so asserting a specific rounded result for them would be testing floating-point representation quirks instead of the formatter's rounding rule.

    Inheritance
    object
    LeaderboardValueFormatterTests
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Leaderboard.Tests.Editor
    Assembly: Serenity.Leaderboard.Tests.Editor.dll
    Syntax
    public class LeaderboardValueFormatterTests

    Constructors

    LeaderboardValueFormatterTests()

    Declaration
    public LeaderboardValueFormatterTests()

    Methods

    Format_Decimal_HasNoPrecisionCeiling()

    Declaration
    public void Format_Decimal_HasNoPrecisionCeiling()

    Format_Decimal_HonoursAuthoredPrecision(int, double, string)

    Declaration
    public void Format_Decimal_HonoursAuthoredPrecision(int decimalPlaces, double value, string expected)
    Parameters
    Type Name Description
    int decimalPlaces
    double value
    string expected

    Format_Decimal_WithoutExplicitPrecision_UsesTheDocumentedDefault()

    Declaration
    public void Format_Decimal_WithoutExplicitPrecision_UsesTheDocumentedDefault()

    Format_Integer_ProducesExpectedText(double, string)

    Declaration
    public void Format_Integer_ProducesExpectedText(double value, string expected)
    Parameters
    Type Name Description
    double value
    string expected

    Format_OneDecimal_ProducesExpectedText(double, string)

    Declaration
    public void Format_OneDecimal_ProducesExpectedText(double value, string expected)
    Parameters
    Type Name Description
    double value
    string expected

    Format_TimeHoursMinutesSeconds_ProducesExpectedText(double, string)

    Declaration
    public void Format_TimeHoursMinutesSeconds_ProducesExpectedText(double value, string expected)
    Parameters
    Type Name Description
    double value
    string expected

    Format_TimeMinutesSeconds_ProducesExpectedText(double, string)

    Declaration
    public void Format_TimeMinutesSeconds_ProducesExpectedText(double value, string expected)
    Parameters
    Type Name Description
    double value
    string expected

    Format_TwoDecimals_ProducesExpectedText(double, string)

    Declaration
    public void Format_TwoDecimals_ProducesExpectedText(double value, string expected)
    Parameters
    Type Name Description
    double value
    string expected

    SupersededPresets_StillRenderAtTheirOriginalPrecision(LeaderboardValueFormat, int)

    Declaration
    public void SupersededPresets_StillRenderAtTheirOriginalPrecision(LeaderboardValueFormat format, int expectedDecimalPlaces)
    Parameters
    Type Name Description
    LeaderboardValueFormat format
    int expectedDecimalPlaces

    ValueFormat_OrdinalsArePinned(LeaderboardValueFormat, int)

    Declaration
    public void ValueFormat_OrdinalsArePinned(LeaderboardValueFormat format, int expectedOrdinal)
    Parameters
    Type Name Description
    LeaderboardValueFormat format
    int expectedOrdinal
    In this article
    © 2026 Serenity. All Rights Reserved