/**
* Radio Submit onProcess behavior.
*/
public void testOnProcess() {
MockContext context = MockContext.initContext();
MockRequest request = context.getMockRequest();
Radio button = new Radio("value", "label", "button");
assertEquals("button", button.getName());
assertTrue(button.onProcess());
request.setParameter("button", "true");
assertTrue(button.onProcess());
Listener l = new Listener();
button.setActionListener(l);
// No request param -> no action listener executed
request.removeParameter("button");
assertTrue(button.onProcess());
context.executeActionListeners();
assertFalse(l.fired);
// No request param -> no action listener executed
request.setParameter("button", "value");
assertTrue(button.onProcess());
context.executeActionListeners();
assertTrue(button.isChecked());
assertTrue(l.fired);
// Disabled button with request param
request.setParameter("button", "true");