Hi everyone!
I have a little problem. When I unit test a wicket panel with a
DropDownChoice I can't get the choices list into dropdown... So, that is
how I use it:
a) ... new DropDownChoice("aWicketId", new ChoicesModel.getObject(),
myOwnChoicesRenderer)
b) The choices Model ist a loadabledetachablemodel. In the load Method a
have a service call, that returns a list of choices:
load(){
myService.getChoicesList()
}
c) In the unit test itself I start the panel with:
Mockito.when(myService.getChoicesList()).thenReturn(mockedChoicesList)
tester.startComponentInThePage(MyPanel.class)...
and somewhere on the bottom of the test:
tester.getComponentFromLastRenderedPage("dropDownId").getChoices and ...
nothing happens... The mocked choices are away...
Can somebody explain me, what do I wrong?
Regards,
Dmitriy