Replies: 1 comment 5 replies
-
Hey @OnlyHicki, I am not sure I do understand your requirements entirely. So you have a component like this (called ...
<CheckboxList></CheckboxList>
<CheckboxList></CheckboxList>
<CheckboxList></CheckboxList>
...
@code {
[Parameter]
public SearhcDIsplay SearchDisplayToggle { get; set; }
[Parameter]
public AdvancedSearchViewModel AdvancedSearchViewModel { get; set; }
[Parameter]
public int SelectedProteinId { get; set; }
} Right now, I am not 100% sure what has to be bound to |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Quite new to bUnit and trying to ensure I am thinking along the correct lines in terms of unit testing a component.
I have a parent search component that contains (amongst other things) 3 instances of a checkbox list. The lists are each bound to a view model property on the parent component in terms of their selected items.
I'd like to mock the lists and setup their selected items, which I assume would then be bound to the view model correctly when I render the cut. I can then confirm that each view model property is correctly bound to the respective child component selected items and is passed to the relevant method on search submit.
I can generate multiple mock instances as per the below, but how do I correctly "SetupGet" each of the instances to have the selected items below? Is it also possible to setup different selected items to each instance?
Could someone explain how I should do this please?
Beta Was this translation helpful? Give feedback.
All reactions