Worth having SupplyParameterFromQueryAttribute
support?
#582
Replies: 1 comment
-
Hi @linkdotnet, I did consider adding something to bUnit that would explicitly support that feature, e.g. perhaps an extension to the If it was an important criteria for a component under test to have the attribute on a property, I would just write a test that verifies that attribute is on the expected property, and not test how the attribute is used by Blazor. |
Beta Was this translation helpful? Give feedback.
-
.NET6 introduced the new attribute
SupplyParameterFromQuery
which basically allows to set a parameter from the query string of the url.Would display "3" if you pass the url
http:localhost:12345/?my-count=3
.As it is a parameter we can currently define the value without any problem
Would it make sense to offer another method which is only meant for query parameters?
Of course we'd have to raise exceptions in various conditions:
Name
part of the attribute (maybe with an overload where this is allowed and we default the given parameter)Beta Was this translation helpful? Give feedback.
All reactions