Skip to content

Commit c505a89

Browse files
Get the name of the InheritViewComponent dynamically in ViewComponentAttributesTestBuilderTests
1 parent d5b0d67 commit c505a89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void TryingToAssertInheritedAttributesWithoutIncludingInheritedShouldThro
9494
.Attributes(attributes => attributes//.IncludingInherited()
9595
.ContainingAttributeOfType<ValidateAntiForgeryTokenAttribute>()
9696
.ContainingAttributeOfType<ResponseCacheAttribute>());
97-
}, "When testing InheritViewComponent was expected to have ValidateAntiForgeryTokenAttribute, but in fact such was not found.");
97+
}, $"When testing {nameof(InheritViewComponent)} was expected to have ValidateAntiForgeryTokenAttribute, but in fact such was not found.");
9898
}
9999
}
100100
}

0 commit comments

Comments
 (0)