Fluent Assertions Documentation
FluentAssertions.Formatting Namespace / FormattedObjectGraph Class
Members
In This Topic
    FormattedObjectGraph Class
    In This Topic
    This class is used by the Formatter class to collect all the output of the (nested calls of an) IValueFormatter into a the final representation.
    Syntax
    public class FormattedObjectGraph 
    Remarks
    The FormattedObjectGraph will ensure that the number of lines will be limited to the maximum number of lines provided through its constructor. It will throw a MaxLinesExceededException if the number of lines exceeds the maximum.
    Inheritance Hierarchy

    System.Object
       FluentAssertions.Formatting.FormattedObjectGraph

    Public Constructors
     NameDescription
    Public ConstructorThis class is used by the Formatter class to collect all the output of the (nested calls of an) IValueFormatter into a the final representation.  
    Top
    Public Properties
     NameDescription
    Public Property Returns the number of lines of text currently in the graph.  
    Public Propertystatic (Shared in Visual Basic) The number of spaces that should be used by every indentation level.  
    Top
    Public Methods
     NameDescription
    Public Method Adds a new fragment of text to the current line.  
    Public MethodStarts a new line with the provided text fragment. Additional text can be added to that same line through AddFragment.  
    Public Method Starts a new line with the provided text that does not allow adding more fragments of text.  
    Public Method If there's only one line, adds a fragment to that line. If there are more lines, adds the fragment as a new line that does not allow any further fragments.  
    Public Method Returns the final textual multi-line representation of the object graph.  
    Public Method Increases the indentation of every line written into this text block until the returned disposable is disposed.  
    Top
    Extension Methods
     NameDescription
    Public Extension MethodSafely casts the specified object to the type specified through TTo.
    Public Extension MethodOverloaded. Invokes the specified action on a subject so that you can chain it with any of the assertions from FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions
    Public Extension MethodOverloaded. Forces enumerating a collection. Should be used to assert that a method that uses the yield keyword throws a particular exception.
    Public Extension Method Provides methods for asserting the execution time of a method or property.
    Public Extension MethodOverloaded. Invokes the specified action on a subject so that you can chain it with any of the assertions from FluentAssertions.Specialized.ActionAssertions
    Public Extension MethodOverloaded. Starts monitoring eventSource for its events.
    Public Extension MethodOverloaded. Returns an FluentAssertions.Specialized.ExecutionTimeAssertions object that can be used to assert the current FluentAssertions.Specialized.ExecutionTime.
    Public Extension MethodOverloaded. Returns an FluentAssertions.Primitives.EnumAssertions<TEnum,TAssertions> object that can be used to assert the current TEnum.
    Top
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also