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
-
ComponentDoubleBase<TComponent>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
objectThe 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
RenderTreeBuilderA RenderTreeBuilder to build DOM tree.
ToString()
public override string ToString()