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
I need to test a component that iterates over the Assets property.
I am currently struggling to figure out how to seed these Assets in bunit.
I already saw that this has been suggested for net9.0, and I am working in net10.0.
However that issue has been closed, because the usecase under test was (probably) appending the hash to the path. #1612
But my usecase to test is an iteration over these assets.
So my question is:
How exactly would I correctly set these assets up in bUnit?
Scenario
publicpartialclassAssetComponent:ComponentBase{privateIReadOnlyList<string>SubresourceNames{get;set;}protectedoverridevoidOnInitialized(){SubresourceNames=Assets.Select(asset =>asset.Properties?.Single(property =>property.Name=="label")?.Value)// The "label" property contains the relative file path..Where( .. ).ToList();}}
Hey,
I need to test a component that iterates over the
Assetsproperty.I am currently struggling to figure out how to seed these Assets in bunit.
I already saw that this has been suggested for
net9.0, and I am working innet10.0.However that issue has been closed, because the usecase under test was (probably) appending the hash to the path.
#1612
But my usecase to test is an iteration over these assets.
So my question is:
How exactly would I correctly set these assets up in bUnit?
Scenario