This content has been marked as final.
Show 2 replies
-
1. Re: Integration testing action events or value change events
tangdazhu Jun 12, 2007 10:22 PM (in response to zzzz8)I have the same question for how to test actionlistener in Seam test, can someone help me?
-
2. Re: Integration testing action events or value change events
tangdazhu Jun 13, 2007 1:08 AM (in response to zzzz8)i have solved this problem by using NonFacesRequest, i pasted the codes here, hope it will be helpful for someone :
@Test
public void testChangeDataset() throws Exception {
new NonFacesRequest() {
@Override
protected void invokeApplication() {
UserBean userBean = (UserBean) Component
.getInstance(UserBean.class);
userBean.setDatasetId(0);
this.invokeMethod("#{userBean.changeDropdown}");
Dataset set = userBean.getCurrentDataset();
assert set!=null;
}
}.run();
}