Interface IViewComponentTestBuilder
Used for testing view components.
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponents
Assembly:MyTested.AspNetCore.Mvc.ViewComponents.dll
Syntax
public interface IViewComponentTestBuilder
Methods
| Improve this Doc View SourceAttributes(Action<IViewComponentAttributesTestBuilder>)
Tests whether the view component has specific attributes.
Declaration
IBaseTestBuilderWithViewComponent Attributes(Action<IViewComponentAttributesTestBuilder> attributesTestBuilder)
Parameters
Type | Name | Description |
---|---|---|
System.Action<IViewComponentAttributesTestBuilder> | attributesTestBuilder | Builder for testing specific attributes on the view component. |
Returns
Type | Description |
---|---|
IBaseTestBuilderWithViewComponent | Test builder of IBaseTestBuilderWithViewComponent type. |
Attributes(Nullable<Int32>)
Tests whether the view component has at least 1 attribute of any type.
Declaration
IBaseTestBuilderWithViewComponent Attributes(int ? withTotalNumberOf = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | withTotalNumberOf | Optional parameter specifying the exact total number of attributes on the tested view component. |
Returns
Type | Description |
---|---|
IBaseTestBuilderWithViewComponent | Test builder of IBaseTestBuilderWithViewComponent type. |
NoAttributes()
Tests whether the view component has no attributes of any type.
Declaration
IBaseTestBuilderWithViewComponent NoAttributes()
Returns
Type | Description |
---|---|
IBaseTestBuilderWithViewComponent | Test builder of IBaseTestBuilderWithViewComponent type. |