logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHudFractionPartRepresentationTests

    Tests for UnityHudFractionPartRepresentation: it renders only the fractional part of a bound number, floored and zero-padded to a chosen digit count, paired with UnityHudIntegerPartRepresentation so a flexbox can show a large integer beside a smaller, faster-ticking fraction.

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

    Constructors

    UnityHudFractionPartRepresentationTests()

    Declaration
    public UnityHudFractionPartRepresentationTests()

    Methods

    FormatValue_DefaultTwoDigits_FloorsAndZeroPads()

    Declaration
    public void FormatValue_DefaultTwoDigits_FloorsAndZeroPads()

    FormatValue_EveryDigitCount_ZeroPadsToItsOwnWidth(int, string)

    Declaration
    public void FormatValue_EveryDigitCount_ZeroPadsToItsOwnWidth(int digits, string expected)
    Parameters
    Type Name Description
    int digits
    string expected

    FormatValue_NegativeValue_MeasuresFromTheFloorSoThePairReconstructsTheValue()

    Declaration
    public void FormatValue_NegativeValue_MeasuresFromTheFloorSoThePairReconstructsTheValue()

    FormatValue_NeverRoundsUp()

    Declaration
    public void FormatValue_NeverRoundsUp()

    FormatValue_NonFiniteValue_RendersAsZeroRatherThanPropagatingNaN()

    Declaration
    public void FormatValue_NonFiniteValue_RendersAsZeroRatherThanPropagatingNaN()

    FormatValue_NullBinding_ReturnsEmpty()

    Declaration
    public void FormatValue_NullBinding_ReturnsEmpty()

    FormatValue_UnchangedFraction_ReusesTheCachedText()

    Declaration
    public void FormatValue_UnchangedFraction_ReusesTheCachedText()

    FormatValue_UnreadableBinding_ReturnsFallbackText()

    Declaration
    public void FormatValue_UnreadableBinding_ReturnsFallbackText()

    Kind_IsFractionPart()

    Declaration
    public void Kind_IsFractionPart()

    ScaleFraction_AFractionAtOrPastOne_ClampsToTheHighestValueTheWidthCanHold(double, int)

    Declaration
    public void ScaleFraction_AFractionAtOrPastOne_ClampsToTheHighestValueTheWidthCanHold(double fraction, int expectedScaled)
    Parameters
    Type Name Description
    double fraction
    int expectedScaled
    In this article
    © 2026 Serenity. All Rights Reserved