@Test
public void checkboxWidgetShouldProduceHtmlWithToggleDim() {
ToggleWidget toggleWidget = new ToggleWidget("{id: 'hatColors', style: 'dim'}");
CheckboxWidget cw = new CheckboxWidget("Has a hat?", "true", toggleWidget.getTargetId(), toggleWidget.isToggleDim());
context.registerWidget(cw);
Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" toggleDim=\"hatColors\"/><label for=\"w1\">Has a hat?</label><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
}
@Test
public void checkboxWidgetShouldProduceHtmlWithToggleHide() {
ToggleWidget toggleWidget = new ToggleWidget("{id: 'hatColors', style: 'hide'}");