Worth having SupplyParameterFromQueryAttribute support?
#582
linkdotnet
started this conversation in
Ideas
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. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
.NET6 introduced the new attribute
SupplyParameterFromQuerywhich 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:
Namepart of the attribute (maybe with an overload where this is allowed and we default the given parameter)All reactions