Table of Contents

Class Stub<TComponent>

Namespace
Bunit.TestDoubles
Assembly
Bunit.Web.dll

Represents a test double stub of a component of type TComponent.

public sealed class Stub<TComponent> : ComponentDoubleBase<TComponent>, IComponent where TComponent : IComponent

Type Parameters

TComponent

The stub type.

Inheritance
Stub<TComponent>
Implements
Inherited Members
Extension Methods

Constructors

Stub()

Initializes a new instance of the Stub<TComponent> class.

public Stub()

Stub(object?)

Initializes a new instance of the Stub<TComponent> class that uses the provided replacement when rendering.

public Stub(object? replacement)

Parameters

replacement object

The replacement template to use when rendering.

Methods

BuildRenderTree(RenderTreeBuilder)

Override to generate a DOM tree from the doubled component.

protected override void BuildRenderTree(RenderTreeBuilder builder)

Parameters

builder RenderTreeBuilder

A RenderTreeBuilder to build DOM tree.

ToString()

public override string ToString()

Returns

string
Progress Telerik

Premium sponsor: Progress Telerik.

Packt

Editorial support provided by Packt.

.NET Foundation

Supported by the .NET Foundation.