public void testUnselectAll() throws Exception { ActionHelper sah = new ActionHelper(); sah.setUpAction(action); sah.setupClampListBounds(); ActionForward forward = sah.executeAction("unselectall"); verifyRhnSetData(sah.getUser().getId(), action.getSetDecl().getLabel(), 0); verifyParam(forward.getPath(), "setupdated", "true"); }
public void testUpdateListPipe() throws Exception { ActionHelper sah = new ActionHelper(); sah.setUpAction(action); sah.setupClampListBounds(); sah.getRequest().setRequestURL("foo"); sah.getRequest() .setupAddParameter("items_selected", new String[] {"777|999", "99|555", "666|77656"}); sah.getRequest().setupAddParameter("newset", (String) null); sah.getRequest().setupAddParameter("items_on_page", (String) null); sah.executeAction("updatelist"); // let's go find the data verifyRhnSetData(sah.getUser().getId(), action.getSetDecl().getLabel(), 3); }
public void testUpdateList() throws Exception { // TestAction action = new TestAction(); ActionHelper sah = new ActionHelper(); sah.setUpAction(action); sah.setupClampListBounds(); sah.getRequest().setRequestURL("foo"); sah.getRequest().setupAddParameter("items_selected", new String[] {"10", "20", "30"}); sah.getRequest().setupAddParameter("newset", (String) null); sah.getRequest().setupAddParameter("items_on_page", (String) null); ActionForward forward = sah.executeAction("updatelist"); // let's go find the data verifyRhnSetData(sah.getUser().getId(), action.getSetDecl().getLabel(), 3); verifyParam(forward.getPath(), "setupdated", "true"); }