コード例 #1
0
 @Test
 public void test_dontPaintHasFormItemClickHandlersAttributeWhenNoHandlerRegistered()
     throws PaintException {
   final PaintTarget paintTarget = mock(JsonPaintTarget.class);
   formItemIcon.paintContent(paintTarget);
   verify(paintTarget, never()).addAttribute(eq("hasFormItemClickHandlers"), anyBoolean());
 }
コード例 #2
0
 @Test
 public void test_paintHasFormItemClickHandlersAttributeWhenHandlersAreRegistered()
     throws PaintException {
   formItemIcon.addFormItemClickHandler(mock(FormItemClickHandler.class));
   final PaintTarget paintTarget = mock(JsonPaintTarget.class);
   formItemIcon.paintContent(paintTarget);
   verify(paintTarget).addAttribute("hasFormItemClickHandlers", true);
 }