Пример #1
0
 @Test
 public void postRequiredArrayProperty() throws Exception {
   try {
     ArrayWrapper body = new ArrayWrapper();
     body.setValue(null);
     client.getExplicit().postRequiredArrayProperty(body);
     fail();
   } catch (ServiceException ex) {
     Assert.assertEquals(IllegalArgumentException.class, ex.getCause().getClass());
     Assert.assertTrue(ex.getMessage().contains("value is required"));
   }
 }
Пример #2
0
 /**
  * Set the behavior of the current editing component to display the specified lines of formatted
  * text when the client hovers over the text.
  *
  * <p>Tooltips do not inherit display characteristics, such as color and styles, from the message
  * component on which they are applied.
  *
  * @param lines The lines of text which will be displayed to the client upon hovering. The
  *     iteration order of this object will be the order in which the lines of the tooltip are
  *     created.
  * @return This builder instance.
  */
 public FancyMessage formattedTooltip(final Iterable<FancyMessage> lines) {
   return formattedTooltip(ArrayWrapper.toArray(lines, FancyMessage.class));
 }
Пример #3
0
 /**
  * Set the behavior of the current editing component to display raw text when the client hovers
  * over the text.
  *
  * <p>Tooltips do not inherit display characteristics, such as color and styles, from the message
  * component on which they are applied.
  *
  * @param lines The lines of text which will be displayed to the client upon hovering. The
  *     iteration order of this object will be the order in which the lines of the tooltip are
  *     created.
  * @return This builder instance.
  */
 public FancyMessage tooltip(final Iterable<String> lines) {
   tooltip(ArrayWrapper.toArray(lines, String.class));
   return this;
 }
Пример #4
0
 /**
  * If the text is a translatable key, and it has replaceable values, this function can be used to
  * set the replacements that will be used in the message.
  *
  * @param replacements The replacements, in order, that will be used in the language-specific
  *     message.
  * @return This builder instance.
  */
 public FancyMessage translationReplacements(final Iterable<FancyMessage> replacements) {
   return translationReplacements(ArrayWrapper.toArray(replacements, FancyMessage.class));
 }