Skip to content

Commit 32ce029

Browse files
Implement IncludingInherited for ViewComponent attributes
1 parent cb0f7cd commit 32ce029

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/MyTested.AspNetCore.Mvc.Abstractions/Builders/Contracts/Attributes/IBaseAttributesTestBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ TAttributesTestBuilder PassingFor<TAttribute>(Func<TAttribute, bool> predicate)
4444

4545

4646
/// <summary>
47-
/// Adds inherited attributes to the attributes.
47+
/// Adds inherited attributes.
4848
/// </summary>
4949
/// <returns>The same attributes test builder.</returns>
5050
TAttributesTestBuilder IncludingInherited();

src/MyTested.AspNetCore.Mvc.ViewComponents/Builders/Attributes/ViewComponentAttributesTestBuilder.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ public ViewComponentAttributesTestBuilder(ComponentTestContext testContext)
2525
/// <inheritdoc />
2626
public IViewComponentAttributesTestBuilder AndAlso() => this;
2727

28+
/// <inheritdoc />
2829
public IAndViewComponentAttributesTestBuilder IncludingInherited()
29-
=> throw new System.NotImplementedException();
30+
{
31+
this.TestContext.IncludeInheritedComponentAttributes();
32+
return this;
33+
}
3034
}
3135
}

0 commit comments

Comments
 (0)