You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug or question
Add a component parameter with a component property which overrides an abstract property of an abstract class without the parameter attribute throws ArgumentException.
System.ArgumentException
The parameter selector 'x => x.Value' does not resolve to a public property on the component 'BoolFieldTest+BoolField' with a [Parameter] or [CascadingParameter] attribute.
at Bunit.ComponentParameterCollectionBuilder`1.GetParameterInfo[TValue](Expression`1 parameterSelector) in /_/src/bunit.core/ComponentParameterCollectionBuilder.cs:line 355
at Bunit.ComponentParameterCollectionBuilder`1.Add[TValue](Expression`1 parameterSelector, TValue value) in /_/src/bunit.core/ComponentParameterCollectionBuilder.cs:line 55
Expected behavior:
I would expect this to work. As a workaround I now set the [Parameter] attribute on the abstract property.
Version info:
Library version: v1.0.0-beta-11
The text was updated successfully, but these errors were encountered:
nickmuller
changed the title
Add a component parameter with a component property which overrides an abstract property of an abstract class without the parameter attribute throws ArgumentException
Add a component parameter with an overridden base property without the parameter attribute throws ArgumentException
Nov 5, 2020
Thanks for reporting this. That is indeed a bug, and I will push a fix later that solves it. It should be available as a nightly build after that, if you are blocked: #209
Describe the bug or question
Add a component parameter with a component property which overrides an abstract property of an abstract class without the parameter attribute throws ArgumentException.
With this test:
Results in this output:
Expected behavior:
I would expect this to work. As a workaround I now set the [Parameter] attribute on the abstract property.
Version info:
The text was updated successfully, but these errors were encountered: