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();
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053797#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...