Skip to content

Commit 61116a4

Browse files
Add Invoke method in InheritViewComponent
1 parent c505a89 commit 61116a4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/MyTested.AspNetCore.Mvc.Test.Setups/ViewComponents/InheritViewComponent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[ResponseCache]
77
public class InheritViewComponent : BaseInheritViewComponent
88
{
9+
public IViewComponentResult Invoke() => this.View();
910
}
1011

1112
[AllowAnonymous]

test/MyTested.AspNetCore.Mvc.ViewComponents.Attributes.Test/BuildersTests/AttributesTests/ViewComponentAttributesTestBuilderTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using Microsoft.AspNetCore.Authorization;
55
using Microsoft.AspNetCore.Mvc;
66
using Setups;
7-
using Setups.Controllers;
87
using Setups.ViewComponents;
98
using Xunit;
109

@@ -89,7 +88,7 @@ public void TryingToAssertInheritedAttributesWithoutIncludingInheritedShouldThro
8988
() =>
9089
{
9190
MyViewComponent<InheritViewComponent>
92-
.Instance()
91+
.Instance()
9392
.ShouldHave()
9493
.Attributes(attributes => attributes//.IncludingInherited()
9594
.ContainingAttributeOfType<ValidateAntiForgeryTokenAttribute>()

0 commit comments

Comments
 (0)